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

Revision number in source, exported

From: Jamax <codemonkey49_at_earthlink.net>
Date: Wed, 30 Apr 2008 15:33:39 -0400 (GMT-04:00)

Looking at the mailing list, every so often somebody goes to the trouble of signing up for the mailing list just so they can post about how the $Revision$ should have the revision of the repository rather than the revision of the file. And every time you guys just ignore them and say:


Well, that's bunk. The svnversion of an exported folder is 'exported' which is completely worthless unless the result is checked back in often (which is an absolutely terrible idea). Also, sometimes the subversion tools are not present, like for instance when I have to compile something on FreeBSD 4 (it happens) and just scp over the repo files.

So there are two times when people may want a repository revision number substituted:

At export -

Just have $Head$ expand to the revision number that was exported. This solves half the problem, and is trivial since svn is writing out all the files for a specific revision anyway.

At update -

Svn update is opening .svn/entries in every folder anyway. So just put something in there that says what files need $Head$ updated because they have 'svn:keywords Head' set.

So... what's the problem?

What I did was to put a $Id$ in each of the source files and then in the makefile I use:

$(shell grep '$$Id' *.[ch] | sed -e 's/^.*$$Id[^0-9]*\([0-9]*\).*/\1/' | sort -rn | head -1)

This *kind of* works, but what I really want is the revision actually updated to or exported, since that is more complete information. For example, there may be a binary file like say a PNG that was updated after the source files which caused some problems.

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-30 21:33:54 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.