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

Global reversion number, why it would be nice.

From: Bret Beck <beck6_at_llnl.gov>
Date: 2007-01-25 21:27:42 CET

Hi,

Let me first state that my group likes subversion and it has many
useful features. However, the following comment^1

"The global revision number attached to the repository as a whole is
meaningless from a user's perspective."

is, I believe, wrong. Why? Because my group develops many code
libraries that are used by many other large codes at my institute.
The other codes want our libraries to return a unique version string.
For example, if I have a library called fooBar, then our users want a
routine called fooBar_version that would return a string like,

"fooBar version 2.0; svn version 91; built Thu Jan 25 11:31:51 2007
by bbeck on nabo.llnl.gov"

As you can see, we would like to use the subversion global revision
number. Why? So that in the future if a user asks us to rebuild the
same version, then all we need to do is checkout using the subversion
revision number (life does not get any easier). By the way, keyword
substitution is too awkward when there are many files in a library -
even when there are only a few. Okay you say, just use the command
svnversion. Yes, that works great when you have a checked out
version, but it does not work when you have an exported version. So
what is my solution? My solution would be something like; have svn
export, and maybe svn checkout, create a file in the top level
directory of the exported copy with a name like
svnGlobalRevisionNumber that contains the, who guessed it, global
revision number. Then, when the libraries is built (e.g., cc-ed),
make can easily be coded to include this reversion number into a
library version string.

Thanks
Bret Beck

1 ) Found in FAQs under the topic "Why does the entire repository
share the same revision number? I want each of my projects to have
their own revision numbers."
Received on Thu Jan 25 23:30:52 2007

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