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

BUG: svn switch does not update URL keywords?

From: Dominic Anello <danello_at_danky.com>
Date: 2005-02-08 21:48:48 CET

I believe I've found a bug in svn's handling of the URL keyword when
processing a switch command, and I'd like to hear other users' thoughts.

When doing a switch, it appears that svn does not update the $URL$
keyword in files that have the keyword set but which have no updates.
To me this seems like a bug. If you do a build from a WC you have
switched, you can wind up pushing out files that have the wrong URL
tagged in them.

Reproduction recipe below.

Any thoughts?

-Dominic

$ svn --version
svn, version 1.1.3 (r12730)
   compiled Feb 8 2005, 15:08:59
...

$ svnadmin create repos

$ svn co file://`pwd`/repos wc
Checked out revision 0.

$ svn mkdir wc/trunk wc/branches
A wc/trunk
A wc/branches

$ echo -e '$URL$\nText file' > wc/trunk/foo.txt

$ svn add wc/trunk/foo.txt
A wc/trunk/foo.txt

$ svn ps svn:keywords URL wc/trunk/foo.txt
property 'svn:keywords' set on 'wc/trunk/foo.txt'

$ svn ci -m "Initial setup" wc
Adding wc/branches
Adding wc/trunk
Adding wc/trunk/foo.txt
Transmitting file data .
Committed revision 1.

$ cat wc/trunk/foo.txt
$URL: file:///home/danello/tmp/repos/trunk/foo.txt $
Text file

$ svn cp wc/trunk wc/branches/1.1
A wc/branches/1.1

$ svn ci -m "branch" wc
Adding wc/branches/1.1

Committed revision 2.

$ cat wc/branches/1.1/foo.txt
$URL: file:///home/danello/tmp/repos/branches/1.1/foo.txt $
Text file

$ svn co file://`pwd`/repos/trunk src
A src/foo.txt
Checked out revision 2.

$ cat src/foo.txt
$URL: file:///home/danello/tmp/repos/trunk/foo.txt $
Text file

$ svn switch file://`pwd`/repos/branches/1.1 src
At revision 2.

$ cat src/foo.txt
$URL: file:///home/danello/tmp/repos/trunk/foo.txt $
Text file

$ rm src/foo.txt

$ svn up src
Restored 'src/foo.txt'
At revision 2.

$ cat src/foo.txt
$URL: file:///home/danello/tmp/repos/branches/1.1/foo.txt $
Text file

  • application/pgp-signature attachment: stored
Received on Tue Feb 8 21:45:51 2005

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.