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

Re: Base revision keyword feature

From: John Peacock <jpeacock_at_rowman.com>
Date: 2006-09-01 19:57:37 CEST

odd.moller@cypoint.se wrote:
> A "base revision" keyword would greatly simplify usage of subversion
> revision numbers as build numbers.

You are mistaken about how keywords work; they are stored unexpanded in
the repository and only the client code expands them at specific times
(e.g. when the file containing the keyword is updated). See also below.

> I know that this is possible today via the svnversion (or svn log) command,
> but a keyword expansion would work without depending on any subversion
> tools on the client, and would work for repository exports as well.

I don't understand this part. It is not possible to checkout or export
from Subversion without using the Subversion tools locally (unless you
are thinking that you can use a web mirroring tool to copy the files
directly out of the repository using the DAV browser).

> I think the above FAQ answer need not apply if the proposed "base revision"
> keyword is implemented in such a way as to avoid a total repository
> traversal. If the svn server knows the set of files that has the "base
> revision" keyword, only these files need have the keyword expanded at
> update/commit. Either the server could automatically keep track of files
> with the "base revision" keyword, or some property on the repository root
> directory could specify the set of files explicitly.

As I said above, the server *never* expands keywords - only the client
does this. If you read the chapter about "Mixed Revision working
copies" you will see that Updates and Commits are completely independent
operations. When you commit a file, that file, and only that file is
committed (for recursive commits read that as being "each file
independently"). No other file will be updated when *this* file has
been changed (it's a core part of how the working copy code operates).

The "base revision" or "repository global revision" is a meta property
of the working copy, or any individual file. That's why it is best
handled in a build system using e.g. svnversion.

HTH

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 1 19:57:58 2006

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.