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

Re: [PROPOSAL] Expansion keywords/properties enhancement

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Thu, 11 Sep 2008 01:55:42 -0500

On Sep 10, 2008, at 03:02, Matthieu Brouillard wrote:

> regarding the answers I had on the previous
> http://www.nabble.com/Automatic-replacement-on-commit-
> td19374972.html thread
> I posted regarding keyword expansion I would like to open a request
> for
> enhancement.
>
> My proposal is that it would be nice to have one of the two following
> solutions implemented in future releases.
>
> 1/ keyword definition/expansion by third party tool:
> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> With some kind of plugin/contribution mechanism, it would be
> possible to
> handle owner keywords. You will then be able to commit file like this:
>
> ### start of file ###
> ...
> $Author$
> $MyKeyword$
> ...
> ### end of file ###
>
> that will be expanded to:
>
> ### start of file ###
> ...
> $Author: Matthieu Brouillard$
> $MyKeyword: SomeProvidedOrCalculatedValue$
> ...
> ### end of file ###

Keywords are only expanded in the client, not in the server. So to
implement custom keywords, you would probably need to have a script
which the client would run to compute the value of your new keyword
so it could be expanded. However Subversion has no client-side script-
running mechanism, and the Subversion developers have strong security-
related motivations for not providing client-side script-running
abilities.

> 2/ Usage of properties in the keyword expansion mechanism
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> As properties are versionned in the same way the files are, it
> should be
> possible to use some keyword extended syntax to access properties
> values in
> the file content.
>
> ### start of file ###
> ...
> $Author$ // No particular syntax => fecth standard
> property
> svn:keywords
> $Rev$
> ...
> $prop:MyProperty$ // extended syntax to access properties
> $prop:copyright$
> ...
> ### end of file ###

It probably could be done but I doubt it would be a high priority to
implement it. Would it be particularly useful to you?

Let's take your example of $prop:copyright$ -- if you want the
copyright to appear in the contents of the file, why not just put it
into the contents of the file instead of putting it into a property
of the file and then trying to include it via some new mechanism?

> Perhaps there should be some rules/ban on the usage of standard
> subversion
> properties and on unversioned properties.
>
> What do you think of the propsal?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-11 08:56:04 CEST

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.