[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [BUG] $URL keyword is not updated on 'svn switch'

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 19 Sep 2010 11:33:02 +0200

On Fri, Sep 17, 2010 at 10:27:13PM -0700, Jeremy Huddleston wrote:
> I did an 'svn switch' to change between trunk and a release branch of clang, and the built binary still reported it was built on trunk. It uses $URL to determine this:
>
> I did an 'svn switch' from clang trunk to the 2.8 branch, and the $URL property was not updated on Version.cpp:
>
> ~/src/llvm/tools/clang/lib/Basic $ grep '\$URL' Version.cpp
> static const char URL[] = "$URL: http://llvm.org/svn/llvm-project/cfe/trunk/lib/Basic/Version.cpp $";
>
> ~/src/llvm/tools/clang/lib/Basic $ svn info Version.cpp
> Path: Version.cpp
> Name: Version.cpp
> URL: http://llvm.org/svn/llvm-project/cfe/branches/release_28/lib/Basic/Version.cpp
> Repository Root: http://llvm.org/svn/llvm-project
> Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
> Revision: 114256
> Node Kind: file
> Schedule: normal
> Last Changed Author: ddunbar
> Last Changed Rev: 103192
> Last Changed Date: 2010-05-06 11:39:38 -0700 (Thu, 06 May 2010)
> Text Last Updated: 2010-05-30 17:21:25 -0700 (Sun, 30 May 2010)
> Checksum: 2bae87644b9b641237ed3724456d938b
>
> ~/src/llvm/tools/clang/lib/Basic $ svn pl Version.cpp
> Properties on 'Version.cpp':
> svn:keywords
>
> ~/src/llvm/tools/clang/lib/Basic $ svn pg svn:keywords Version.cpp
> URL

FYI, proplist -v shows values, too.
 
> ~/src/llvm/tools/clang/lib/Basic $ rm Version.cpp
>
> ~/src/llvm/tools/clang/lib/Basic $ svn update
> Restored 'Version.cpp'
> At revision 114268.
>
> ~/src/llvm/tools/clang/lib/Basic $ grep '\$URL' Version.cpp
> static const char URL[] = "$URL: http://llvm.org/svn/llvm-project/cfe/branches/release_28/lib/Basic/Version.cpp $";

I can reproduce this problem with 1.6.x and trunk svn clients on the llvm.org
repository. Please file an issue. Thanks.

I cannot reproduce this problem with the attached script, however.
So the simple case seems my script is testing seems to work.
Here's the output:

+ rm -rf expand-url
+ mkdir -p expand-url
+ mkdir -p expand-url/trunk
+ echo alpha
+ > expand-url/trunk/alpha
+ echo beta
+ > expand-url/trunk/beta
+ mkdir expand-url/trunk/gamma
+ echo delta
+ > expand-url/trunk/gamma/delta
+ mkdir expand-url/trunk/epsilon
+ echo zeta
+ > expand-url/trunk/epsilon/zeta
+ svnadmin create /tmp/expand-url/repos
+ svn import expand-url/trunk file:////tmp/expand-url/repos/trunk -m importing project tree
Adding expand-url/trunk/gamma
Adding expand-url/trunk/gamma/delta
Adding expand-url/trunk/alpha
Adding expand-url/trunk/epsilon
Adding expand-url/trunk/epsilon/zeta
Adding expand-url/trunk/beta

Committed revision 1.
+ svn copy file:////tmp/expand-url/repos/trunk file:////tmp/expand-url/repos/branch -m creating branch

Committed revision 2.
+ rm -rf expand-url/trunk
+ svn checkout file:////tmp/expand-url/repos/trunk expand-url/trunk
A expand-url/trunk/gamma
A expand-url/trunk/gamma/delta
A expand-url/trunk/alpha
A expand-url/trunk/epsilon
A expand-url/trunk/epsilon/zeta
A expand-url/trunk/beta
Checked out revision 2.
+ svn checkout file:////tmp/expand-url/repos/branch expand-url/branch
A expand-url/branch/gamma
A expand-url/branch/gamma/delta
A expand-url/branch/alpha
A expand-url/branch/epsilon
A expand-url/branch/epsilon/zeta
A expand-url/branch/beta
Checked out revision 2.
+ svn ps svn:keywords URL expand-url/trunk/alpha
property 'svn:keywords' set on 'expand-url/trunk/alpha'
+ echo $URL$
+ >> expand-url/trunk/alpha
+ svn ci -m show URL in alpha expand-url/trunk
Sending expand-url/trunk/alpha
Transmitting file data .
Committed revision 3.
+ cat expand-url/trunk/alpha
alpha
$URL: file:///tmp/expand-url/repos/trunk/alpha $
+ svn ps svn:keywords URL expand-url/branch/alpha
property 'svn:keywords' set on 'expand-url/branch/alpha'
+ echo $URL$
+ >> expand-url/branch/alpha
+ svn ci -m show URL in alpha expand-url/branch
Sending expand-url/branch/alpha
Transmitting file data .
Committed revision 4.
+ cat expand-url/branch/alpha
alpha
$URL: file:///tmp/expand-url/repos/branch/alpha $
+ svn switch file:////tmp/expand-url/repos/branch expand-url/trunk
At revision 4.
+ cat expand-url/trunk/alpha
alpha
$URL: file:///tmp/expand-url/repos/branch/alpha $
+ svn switch file:////tmp/expand-url/repos/trunk expand-url/branch
At revision 4.
+ cat expand-url/branch/alpha
alpha
$URL: file:///tmp/expand-url/repos/trunk/alpha $

Received on 2010-09-19 11:33:53 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.