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

Re: snv:keywords - want current checked out working revision ID

From: SteveKing <steveking_at_gmx.ch>
Date: 2004-05-07 19:29:34 CEST

Adrian Oliver wrote:

> I want to be able to put into my code the currently checked out working
> revision ID using a keyword.
>
> For example, when I perform an svn update, svn checkout or svn commit,
> the last thing it displays is: "Updated to revision 140."
>
> I would like to put into my code the "140" using a keyword, as it
> provides a means of linking a compiled executable with the svn revision
> used to generate it.
>
> I accept that if changes are made after the update, checkout or commit
> and are not recommitted, that it would not be telling the whole truth.
>
> When we perform releases, we generally make a fresh checkout before
> building.

Try the small utility SVNWCRev.exe which TortoiseSVN uses to generate a
header file with those revision numbers in it. The tool can be found
here (under "Misc Tools"):
http://tortoisesvn.tigris.org/download.html
To see how this tool works, start it without any parameters. You can
also check out the template file TortoiseSVN uses here:
http://svn.collab.net/repos/tortoisesvn/trunk/src/version.in

Stefan

--
"The whole problem with the world is that fools and fanatics are always 
so certain of themselves, but wiser people so full of doubts." - 
Bertrand Russell
--
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat May 8 02:10:11 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.