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

repository revision -> header file?

From: Ralf W. Grosse-Kunstleve <rwgk_at_yahoo.com>
Date: 2006-05-12 00:57:21 CEST

I see SVN maintains a global revision number for a repository. I'd
like to access this revision number via a C or C++ header file, e.g.

  myproj/version.h:

  #define MYPROJ_REPOSITORY_REVISION $RepositoryRevision$

I.e. each time svn update is run, I'd like to get the same number
that is printed at the end ("Updated to revision 4548."):

  #define MYPROJ_REPOSITORY_REVISION 4548

This would allow me to easily adjust to evolving library code:

  #include <myproj/version.h>
  #if MYPROJ_REPOSITORY_REVISION < 4548
  // use old interfaces
  #else
  // use new interfaces
  #endif

Can this somehow be done with SVN?

Thank you in advance!

Cheers,
        Ralf

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 12 00:58:29 2006

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.