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

Base revision keyword feature

From: <odd.moller_at_cypoint.se>
Date: 2006-09-01 15:01:38 CEST

Hello!

I have a feature request regarding access to the base revision number (the
current revision number of the repository at checkout/export/update) as a
keyword.

A "base revision" keyword would greatly simplify usage of subversion
revision numbers as build numbers.
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.

From the FAQ:
Q: "Why doesn't the $Revision$ keyword do what I want? It expands to the
file's last-changed revision, but I want something that will expand to the
file's current revision."
A: "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."

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.

One way of implementing this (without changing the server) would be to
update a file at each commit. The problem with this is that there exists no
method of adding files to the transaction change set via a hook (afaik).

Greetings
/// Odd Möller

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 1 15:02:18 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.