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

Re: Modify properties in pre-commit hook

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-09-23 22:57:40 CEST

On Sep 22, 2004, at 1:30 PM, kfogel@collab.net wrote:

> Mark Phippard <MarkP@softlanding.com> writes:
>> The text within the pre-commit hook template implies it would be OK to
>> modify the revision properties of the transaction, but how would you
>> do
>> it? I do not see any API's that operate on a txn that can do this. I
>> would like to add custom revision properties in the hook. I can do it
>> after the commit in a post-commit hook, but that then also requires
>> the
>> pre-revprop-change hook to allow the revision properties to be
>> altered.
>>
>> Here is the specific text I am referring to:
>>
>> # *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT ***
>> # *** FOR REVISION PROPERTIES (like svn:log or svn:author). ***
>
> Actually, I don't think we have any APIs for doing that to a txn.
> (Which is a bit of an oversight, not to mention confusing given the
> above comment...)
>

Of course we have APIs for changing revision props on a transaction.
Can 'svnadmin' do it? Not at all, other than the 'svnadmin setlog'
commmand. But do we have APIs? Of course!

Just use svn_fs.h. Call svn_fs_open_txn(), followed by
svn_fs_change_txn_prop(). Write a C program, or do it in Perl or
Python. Whatever you want.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 23 22:59:01 2004

This is an archived mail posted to the Subversion Users mailing list.