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

Re: Global revision keyword

From: Mark Phippard <MarkP_at_softlanding.com>
Date: 2004-10-27 15:20:53 CEST

Duncan Murdoch <murdoch@stats.uwo.ca> wrote on 10/27/2004 09:05:19 AM:

> Last year there was a discussion on this list about the problems of
> implementing an svn:keywords subsitution keyword which puts in place
> the global revision of a source tree. The general impression I got
> from reading it was that this was too much of a special case need to
> justify putting it in.
>
> First of all, has this changed? I don't see it in the book, but is it
> there now?

I believe the consensus is that this feature could never be implemented.
To do it correctly, everytime you did an svn up or svn ci, Subversion
would have to process your entire WC looking for files that have this
keyword associated with them. And it would have to do so even for people
not using the keyword at all, unless there were some kind of global
configuration setting.

> If not, has anyone written a hook script to have the same effect? For
> example, I'd like a script that did the following:
>
> If there's a commit to the trunk, then before acting on it, the script
> would write something (the new revision number, if that's available,
> or maybe just a timestamp) to a version file, and add that file to the
> commit. If the commit is to a branch, it would write to the file in
> that branch.

I do not think this can be done in a hook script. I think what you would
want to do is the pretty much the same thing, except do it on the client.
Create a "svn-commit" script that your users use instead of svn ci. The
script would do something to update a file, or a property on that file and
then run svn ci. That would cause that file to be included in the commit,
and would allow you to then use the LastChangedRevision keyword in that
file.

The one thing I have not seen, is why it is so necessary to have this
information in a file to begin with? Why can't you just use a more normal
release process and use Tags for your releases?

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 27 15:21:24 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.