Bug 215863 - [webkitpy] repository svn version is incorrect when working on a branch
Summary: [webkitpy] repository svn version is incorrect when working on a branch
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-26 13:32 PDT by Carlos Alberto Lopez Perez
Modified: 2020-08-27 19:01 PDT (History)
10 users (show)

See Also:


Attachments
Patch (1.67 KB, patch)
2020-08-26 13:35 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2020-08-26 13:32:08 PDT
It seems than when you are working on a SVN branch, the SVN revision pointed by HEAD will *not* be the last change done on your branch, but the last change done on trunk (which is irrelevant for your checkout)

See this example:

1. Check out webkitgtk-2.28.0 svn branch
$ svn co http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.28.0 build
# .... lot of files
Checked out revision 266187.

2. Check what svn info says:
$ cd build
$ svn info
Path: .
Working Copy Root Path: /tmp/build
URL: http://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.28.0
Relative URL: ^/releases/WebKitGTK/webkit-2.28.0
Repository Root: http://svn.webkit.org/repository/webkit
Repository UUID: 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revision: 266187
Node Kind: directory
Schedule: normal
Last Changed Author: carlosgc@webkit.org
Last Changed Rev: 258193
Last Changed Date: 2020-03-10 12:10:24 +0100 (Tue, 10 Mar 2020)



So, the last change done on that branch was in reality r258193 (2020-03-10), but svn is saying that my working copy is r266187 (basically trunk of today)


This causes the tool glib-revision to print the wrong revision, which then is passed to the build and the version stamped for the build is incorrect.

$ Tools/glib/svn-revision 
r266187


I think we should pick the "Last Changed Rev" changeset instead of the "Revision" changeset from svn info.
Comment 1 Carlos Alberto Lopez Perez 2020-08-26 13:35:36 PDT
Created attachment 407331 [details]
Patch
Comment 2 Jonathan Bedard 2020-08-26 13:38:26 PDT
Comment on attachment 407331 [details]
Patch

Unfortunate we have no tests for this.....
Comment 3 Jonathan Bedard 2020-08-26 13:39:05 PDT
(In reply to Jonathan Bedard from comment #2)
> Comment on attachment 407331 [details]
> Patch
> 
> Unfortunate we have no tests for this.....

(To be clear, this is not a request to add tests, simply a comment on how we've organized this part of webkitpy)
Comment 4 Carlos Alberto Lopez Perez 2020-08-27 18:54:05 PDT
Yes, i also wished to had some tests. I did manual tests as much as possible and it seems to work as expected.
Thanks for the review ! :)
Comment 5 EWS 2020-08-27 19:00:39 PDT
Committed r266267: <https://trac.webkit.org/changeset/266267>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407331 [details].
Comment 6 Radar WebKit Bug Importer 2020-08-27 19:01:16 PDT
<rdar://problem/67911890>