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

Embedding tag name in files

From: Richard Curnow <rc_at_rc0.org.uk>
Date: 2003-04-30 00:17:57 CEST

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.)

Cheers

-- 
Richard P. Curnow | Free software fundamentalist
Weston-super-Mare | 
United Kingdom    | http://www.rc0.org.uk/
---------------------------------------------------------------------
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:00:35 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.