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

Re: Adding/defining a property during commit

From: Gerco Ballintijn <gerco_at_ballintijn.com>
Date: 2007-06-14 00:18:22 CEST

Ryan Schmidt wrote:
>
> On Jun 12, 2007, at 08:26, marc ballat wrote:
>
>> I know that a hook script should not modify the content of a commit
>> transaction.
>>
>> Does anyone have a solution to add a property during commit when the
>> client can either be Tortoise, the command line or Apache and
>> mod_dav_svn ?
>
> What kind of property? If you mean a versioned property on a file, then
> your hook script would have to check out a new working copy (or update
> an existing server-side one), "svn propset" the property on the file,
> and "svn commit" the new revision. You would have to engineer the hook
> carefully so that it would not act on the commit that it itself is then
> performing.
>
> If you mean an unversioned revision property, then you can set the
> property easily. Just "svn propset --revprop -r $REV file://$REPOS
> $PROP_NAME $PROP_VALUE". You would need to install a pre-revprop-change
> hook which allows revprop changes to take place. Also note that I'm
> using the argument "-r $REV" to specify the revision. "svn help propset"
> shows that there is no way to tell it to use a transaction instead of a
> revision. So this would only work in, for example, the post-commit hook,
> not the pre-commit hook.
>

Note that 1.5, whenever it will be finished, will also allow you to set
revision properties during a commit.

Gerco.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 14 00:18:48 2007

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.