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

RE: Build numbers

From: Tim Armes <tarmes_at_fr.imaje.com>
Date: 2003-11-13 16:00:20 CET

I've been looking at the use of svnversion. Unfortunately, this doesn't
quite do what I want.

Scenario:

I have a tagged version of the project stored in the tags directory. It was
created at revision 56.
I want to check this version out and compile it:

svn co http://blah/tags/2.3

Subversion kindly tells me that it's checked out revision 231. True enough.
The last change however was performed at revision 56. I try svnversion,
which reportes 231. This is correct, but it's not the behaviour I need.

I can resolve this by doing:

svn co -r COMMITTED http://blah/tags/2.3

However, checking out and recompiling old versions isn't a very common
occurance. I can't rely on my developers to remember that that's what they
need to do. They'll simply checkout and recompile and the build number'll
be wrong - they probably won't even notice.

What I need then, is an svnlastchangedversion command.

Any ideas?

Tim

Tim Armes wrote:
> The $Rev$ keyword is substituted by the last revision in which a file
> changed.
>
> Is there a keyword which is substituted by the latest version of the
> repository as a whole?

No. Because that would mean "svn up" would have to change files in the wc
even though they had not changed in the repository - i.e. it would have to
function totally differently to all the other keywords.

> I'd like to use this to automatically embed a
> build number in the source.

Try using svnversion in your build process.

Max.
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 13 16:01:29 2003

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.