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

$Rev$ value wrong on checkout?

From: Bill Comisky <bcomisky_at_pobox.com>
Date: 2003-06-21 21:35:26 CEST

On checkout the keyword substitution for $Rev$ gets set to checked out
revision number rather than the last changed revision for the file.. The
'Last Changed Rev:' line from 'svn info filename' returns the correct
revision number. This behaviour is wrong isn't it?

It works the same using ra_local and ra_dav. The keyword substitution
seems to work fine using 'svn up' in the original working copy (except for
issue 1292), and when exporting. Below is a recipe where I compared the
value of $Rev$ with the output of 'svn info' for the original updated
working copy (OK), a fresh checkout (not-OK), and an exported copy (OK).

bill

[bcomisky@localhost]$ svnadmin create /tmp/repos1
[bcomisky@localhost]$ mkdir tmp
[bcomisky@localhost]$ cd tmp
[bcomisky@localhost]$ echo '$Rev$' > foo
[bcomisky@localhost]$ echo '$Id$' >> foo
[bcomisky_at_localhost]$ svn import -m '' file:///tmp/repos1/trunk
Adding foo

Committed revision 1.
[bcomisky@localhost]$ cd ..
[bcomisky_at_localhost]$ svn checkout file:///tmp/repos1/trunk wc1
A wc1/foo
Checked out revision 1.
[bcomisky@localhost]$ cd wc1
[bcomisky@localhost]$ svn propset svn:keywords 'Id Rev' foo
property `svn:keywords' set on 'foo'
[bcomisky@localhost]$ svn commit -m 'modified keywords for foo'
Sending foo

Committed revision 2.
[bcomisky@localhost]$ touch file1 file2
[bcomisky@localhost]$ svn add file1
A file1
[bcomisky@localhost]$ svn commit -m 'added file 1'
Adding file1
Transmitting file data .
Committed revision 3.
[bcomisky@localhost]$ svn add file2
A file2
[bcomisky@localhost]$ svn commit -m 'added file 2'
Adding file2
Transmitting file data .
Committed revision 4.
[bcomisky@localhost]$ rm -f foo # to avoid issue 1292
[bcomisky@localhost]$ svn update
Restored foo
At revision 4.
[bcomisky@localhost]$ cat foo
$Rev: 2 $
$Id: foo 2 2003-06-21 19:06:47Z root $
[bcomisky@localhost]$ svn info foo | grep Rev
Revision: 4
Last Changed Rev: 2
[bcomisky@localhost]$ cd ..
[bcomisky_at_localhost]$ svn checkout file:///tmp/repos1/trunk wc2
A wc2/file1
A wc2/file2
A wc2/foo
Checked out revision 4.
[bcomisky@localhost]$ cd wc2
[bcomisky@localhost]$ cat foo
$Rev: 4 $
$Id: foo 4 2003-06-21 19:06:47Z root $
[bcomisky@localhost]$ svn info foo | grep Rev
Revision: 4
Last Changed Rev: 2
[bcomisky@localhost]$ cd ..
[bcomisky_at_localhost]$ svn export file:///tmp/repos1/trunk exported
A exported
A exported/file1
A exported/file2
A exported/foo
[bcomisky@localhost]$ cd exported
[bcomisky@localhost]$ cat foo
$Rev: 2 $
$Id: foo 2 2003-06-21 19:06:47Z root $

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 21 21:36:20 2003

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

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