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

Get tag (not revision) into C & perl programs

From: j.j.green <j.j.green_at_shef.ac.uk>
Date: 2006-12-13 22:50:20 CET

Hi

I'm a recent refugee from PRCS and am kind of stuck on a problem.
PRCS has major/minor version keywords which I can get into my
programs easily:

  /* $Format: "#define PROJECT_VER_MAJ $ProjectMajorVersion$" $ */
  #define PROJECT_VER_MAJ 5
  /* $Format: "#define PROJECT_VER_MIN $ProjectMinorVersion$" $ */
  #define PROJECT_VER_MIN 39

and then I have my programs print

  This is program (version 5.39)

when they operate verbosely. I get that for subversion I need to use
tags to hold the human-readable release-version, and these are
disconnected from the revision. I guess that I will need to do some
scripting in order to get a release version into my C & perl programs.
Im thinking a script that
 - pulls a release-version.txt file from the repository
 - read and increments the version in that file to "5.30"
 - checks the file back in
 - checks out a C header and writes the release-version as a #define RELVER
5.30
 - checks the file back in
 - creates the tagged release as tags/program-5.30

This is OK for C. But I have around 60 perl programs which use the same
PCRS mechanism:

  # The version: $Format: my "\$version = \"$ProjectVersion$\";"$
  my $version = "5.39";

So this is going to get cumbersome. I've searched around but can't find
a slick way to do this. I've seen the FAQ on getting the revision into C,
but I'm after insertng the *tag*

I'd be most grateful for suggestions

Jim

-- 
View this message in context: http://www.nabble.com/Get-tag-%28not-revision%29-into-C---perl-programs-tf2816911.html#a7862119
Sent from the Subversion Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 13 22:51:20 2006

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