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

Re: Patching file before commit

From: Bill Comisky <bcomisky_at_pobox.com>
Date: 2003-06-29 19:40:53 CEST

On Sun, 29 Jun 2003, Helge Jung wrote:

> e.huelsmann@gmx.net wrote:
> > Why would you want that before the commit? If you put
> >
> > $Revision$
> >
> > in your file, then it will always contain the revision number
> > on which your software is based. After the commit, this file
> > will contain the correct number and when checking out a specific
> > revision, the file will contain the revision number you requested
> > to be checked out. Isn't that what you want?
>
> I had to use $Rev$ but it is working now as I planned it.

This is incorrect. $Rev$ is a shortcut for $LastChangedRevision$, which
will expand to the revision number in which the file changed. On checkout
the value should not change, though there was bug recently where it got
expanded to the revision that was checked out). Until a new keyword is
implemented to give you the last checked out/updated revision number, you
have to either have your script call 'svnversion' or parse the output of
'svn info wc-root'. If you are working on an exported version this won't
work. Instead you can create a tag and export that, then parse $HeadURL$
for version information you store in the name of the tag. Tedious &
prone to errors, yes.

 
> Does a list with all possible keyword/substitutes exists? I'm searching
> for the keywords giving me the date of the last commit in the repository
> (not $LastChangedDate$ date of the last commit of the actual file).

See the section on svn:keywords in "Special Properties" here:

http://svnbook.red-bean.com/

or, from 'svn help propset':

 svn:keywords - Keywords to be expanded. Valid keywords are:
   URL, HeadURL - The URL for the head version of the object.
   Author, LastChangedBy - The last person to modify the file.
   Date, LastChangedDate - The date/time the object was last modified.
   Rev, LastChangedRevision - The last revision the object changed.
   Id - A compressed summary of the previous
                                4 keywords.

I remember seeing a patch sent to the list to allow 'custom' keywords, but
you'd have to search the list/issues for more info on that.

bill

-- 
Bill Comisky
bcomisky@pobox.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jun 29 19:41:46 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.