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

Re: Embedding tag name in files

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2003-04-30 01:04:32 CEST

On Tuesday, April 29, 2003, at 06:17 PM, Richard Curnow wrote:

> I use the following behaviour with CVS, and was wondering how I can
> achieve it with subversion.
>
> With CVS, I embed $Name$ in the source somewhere, e.g. as
>
> static char *version = "$Name";
>
> Now when I release the code, I tag the repository
>
> cvs rtag VX_Y project
>
> Then when I do 'cvs export -r VX_Y project' to get the source tree from
> which the tarball is created, the $Name$ string is replaced by VX_Y.
> Inside the program, I can process this to report the program version to
> service the --version switch etc.
>
> I can't see an obvious way to do the equivalent in subversion. How do
> people embed released s/w versions inside the program source? (Other
> than the obvious hand editing a file, committing that then forking the
> tagged version of the trunk - I'd like to avoid this kind of thing.)

the $URL$ keyword seems like the subversion equivalent of this
functionality.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 30 01:05:19 2003

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