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

RE: Re: Replace keywords instead of expanding them

From: André Pönitz <andre_at_wasy.de>
Date: 2005-05-24 16:32:54 CEST

> On Tue, 24 May 2005, Christoph Hirzel wrote:
> > Does anybody know if it is possible to tell subversion to replace a
> > keyword (e.g. $Revision$) instead of expanding it. Currently the
> > following statement
> >
> > $Revision$
> >
> > is expanded to e.g.
> >
> > $Revision: 144 $
> >
> > What I would need is a replacement to just
> >
> > 144
> >
> that's not possible, since svn needs to be able to unexpand the keyword
> again. Say you check out the file and the keyword was expanded to 144.
> Then you edit the file and commit. How could subversion know where the 144
> is that it should replace with a new revision number.

Unless it's already on the agenda I'd like to ask for a new feature:
Make that expansion user-definable (within reasonable limits).

As it stands right now, the expanded string can not be manipulated
by plain C preprocessor magic. This would be helpful in certain
settings and could e.g. be achieved by expanding the $Revision$
tag to e.g. "#define SVN_REVISION xxx". This is un-expandable
pretty much the same way the "$Revision: xxx $" string is.

So one idea would be to allow for user defined sed expressions
or some ad hoc syntax for expanding/unexpanding.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 24 16:34:54 2005

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.