You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bill Comisky <bc...@pobox.com> on 2003/06/21 19:35:26 UTC

$Rev$ value wrong on checkout?

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@localhost]$ svn import -m '' file:///tmp/repos1/trunk
Adding         foo

Committed revision 1.
[bcomisky@localhost]$ cd ..
[bcomisky@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@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@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

Re: $Rev$ value wrong on checkout?

Posted by Ben Collins-Sussman <su...@collab.net>.
Bill Comisky <bc...@pobox.com> writes:

> 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?

Yeah, I think someone just noticed this bug and submitted a patch for
it.  Someone will review and apply shortly, I'm sure.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org