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

Re: Commiting file which contains the next revision number

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-12-16 20:08:36 CET

[keeping this on the users@ list]

On Dec 16, 2004, at 12:51 PM, Daniel Jackson wrote:

> Ben,
>
> If I have a file with this:
>
> line1 - $Rev$
>
> Then I commit and update it as revision 1.
>
> Then I edit it so it looks like this:
>
> line1 - 1
> line2 - $Rev$
>
> Then I commit and update it as revision 2.
>
> Don't I get this:
>
>

[sussman@BenBook:~/scratch]$ svnadmin create repos
[sussman_at_BenBook:~/scratch]$ svn co file://`pwd`/repos wc
Checked out revision 0.
[sussman@BenBook:~/scratch]$ cd wc
[sussman@BenBook:~/scratch/wc]$ echo "\$Rev:\$" > file
[sussman@BenBook:~/scratch/wc]$ svn add file
A file
[sussman@BenBook:~/scratch/wc]$ svn propset svn:keywords Revision file
property 'svn:keywords' set on 'file'
[sussman@BenBook:~/scratch/wc]$ cat file
$Rev$
[sussman@BenBook:~/scratch/wc]$ svn ci -m "add file"
Adding file
Transmitting file data .
Committed revision 1.
[sussman@BenBook:~/scratch/wc]$ cat file
$Rev: 1 $
[sussman@BenBook:~/scratch/wc]$ echo "new text" >> file
[sussman@BenBook:~/scratch/wc]$ cat file
$Rev: 1 $
new text
[sussman@BenBook:~/scratch/wc]$ svn ci -m "commit again"
Sending file
Transmitting file data .
Committed revision 2.
[sussman@BenBook:~/scratch/wc]$ cat file
$Rev: 2 $
new text

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 16 20:12:19 2004

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.