[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: Leyendecker, Robert <Robert.Leyendecker_at_lsi.com>
Date: Wed, 9 Dec 2009 11:28:30 -0500

> -----Original Message-----
> From: Bob Archer [mailto:Bob.Archer_at_amsi.com]
> Sent: Wednesday, December 09, 2009 10:09 AM
> To: Leyendecker, Robert; Thomas Harold
> Cc: users_at_subversion.tigris.org
> Subject: RE: Any simple way to set/get global revision number?
>
> How about taking a slightly different approach.
>
> Rather than versioning your app based on the svn revision number,
> version it based on the build number. Have the build script update the
> version.h file. Once the build is done commit the version.h file and
> create a tag for that build. Now if someone updates from head and does
> a manual build the version.h file is correct for that revision.
>
> BOb
>
>
Yes, I failed to mention that is similar to the first approach I implemented - people use mix of linux and windows tortoise client and they instinctively just commit specific files they changed (me included) and the elegant self generating version .h file (that I spent time getting just right with lots of echo's and >> and a note about this being an automatically generated file, do not edit, etc :-) sits as an orphan in their directory forever or until they remember to check it in. Next person does update and the version number is unchanged.

Of course having the build script doing an auto-commit on file changes isn't practical since people do tons of builds a day. Looks like creating a special build process using auto tools or scripts and svnversion seems only solution and if you don't have this with full svn and gnu in your environment you are out of luck and have to rely on manually versioning those files before distributing them.

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

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-09 17:34:31 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.