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

Re: Any simple way to set/get global revision number?

From: BRM <bm_witness_at_yahoo.com>
Date: Tue, 8 Dec 2009 12:45:01 -0800 (PST)

It depends on the platform you are using. If you are using TSVN then there is a program (SubWCRev I think) that can do things like you want.
But as far as I am aware it is not official SVN functionality, and likely never will be since (to my understanding) the SVN devs don't want client-side scripting; though a number of SVN clients do support it (like TSVN).

What you want to do, however, is best left for your build tools to do. If you need multi-platform support that is a bit harder; but still possible, especially with tools like CMake, which can help you with this kind of scripting functionality - but I'd leave that to the CMake folks (cmake.org) and their mailing lists for how to do it.

HTH,

Ben

________________________________
From: "Leyendecker, Robert" <Robert.Leyendecker_at_lsi.com>
To: users_at_subversion.tigris.org
Sent: Tue, December 8, 2009 2:43:17 PM
Subject: Any simple way to set/get global revision number?

  Say I have a c file called version.h and in this file is a macro to build a version string using $HeadURL$ and $Revision$. When a user runs the program this information is printed into the log file to help isolate problems to specific versions that change
on daily basis.
 
Is there a way to set a property so that this version.h file is automatically checked out whenever an update is made to the directory even if the version.h file is not touched? Or conversely, is there a way to have it automatically checked in as a changed
file whenever a commit is done on any other file in the directory?
 
I’m trying to avoid having to manually run/maintain external scripts or programs like svnversion to scrape/touch/alter version files and force changes since the src files may be ported to different systems and I want the svn info embedded into a single
version file.
 
Am I out of luck for an easy solution?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2428317

Please start new threads on the <users_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <users-subscribe_at_subversion.apache.org>.
Received on 2009-12-08 21:46:23 CET

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.