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

Re: Way to get current revision as keyword...?

From: Theo Van Dinter <felicity_at_kluge.net>
Date: 2004-12-04 18:53:25 CET

On Sat, Dec 04, 2004 at 05:27:10PM -0000, Max Bowsher wrote:
> FAQ.
> http://subversion.tigris.org/project_faq.html#version-value-in-source

Darn it! I looked at the FAQ after checking the book. Apparently my
search skills have become lax when not using Google. ;)

Ok, so now I have some thoughts about the FAQ answer:

"Subversion increments the revision number of the repository as a whole, so it
can't expand any keyword to be that number - it would have to search and
possibly modify every file in your working copy on every update and commit."

Exactly! That's the point! It's actually not as bad as the answer lets
on. All that needs to happen is a search of file props per operation --
the actual files don't need to be scanned, and 2/3 of the time it's
already doing that work anyway.

On commit, svn has to check props since there could be changes.
On checkout/export, svn has to do this to handle the current keywords.

So the only place svn needs to do extra work is on update, where it
needs to check all the WC props to see if the keyword needs replacing.
Arguably, updates happen more often than commits and checkouts, so that's
why it's considered to be a bad idea. However, it would be pretty
trivial to mark the WC base upon commit and checkout if there's a file
underneath which has the property set. That way if the keyword isn't
enabled anywhere, there's no extra cost to doing an update.

The reason why I'd like to see a keyword version is because the
script/Makefile hack (via FAQ)/etc idea doesn't work in situations such as
"svn export". The counter would be "do a temp checkout, modify the WC,
export, and rm the temp checkout", but that's a lot of extra steps/work.

Randomly Generated Tagline:
"Why is there a watermelon there? I'll tell you later." - From Buckaroo Bonzai

  • application/pgp-signature attachment: stored
Received on Sat Dec 4 18:55:44 2004

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.