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

How to insert global (not last changed) revision number into code?

From: Sean Spicer <sspicer_at_magic-earth.com>
Date: 2004-07-02 17:05:44 CEST

Okay, I've got another good question (I think):

I'd like to insert the last checked-out revision number (that returned
by svn status -u) as a string into a piece of code. So what I'd like
to do is have

// version.h

const string REVISION_NUMBER = "$GlobalRev$"
const string REVISION_LOCAL="$GlobalLocal$"

Where global rev get's expanded to the latest global revision number
when I checkout the code. Also the local is important (whether I'm on
a trunk or a branch). So the expanded file might look like:

// version.h

const string REVISION_NUMBER="12452"
const string
REVISION_LOCAL="/home/sspicer/Project/branches/wxWindows_port

Any ideas on what would be the best way to do this ?

sean

______________________________________________________
Sean Spicer
Volume Interpretation R&D Manager
Landmark Graphics
www.lgc.com

pgp key fingerprint: 8CED 19B7 3A3A BF54 B8E8 FB11 E044 F6B8 1585 9D54
pgp key (ID 15859D54) available at www.keyserver.net & pgpkeys.mit.edu

Received on Fri Jul 2 17:08:35 2004

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