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

Re: svn commit: r1375675 - in /subversion/trunk/subversion: include/svn_repos.h libsvn_repos/fs-wrap.c libsvn_repos/hooks.c libsvn_repos/repos.c libsvn_repos/repos.h tests/cmdline/commit_tests.py tests/cmdline/svntest/actions.py

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 21 Aug 2012 14:09:33 -0400

On 08/21/2012 01:54 PM, Blair Zajac wrote:
> On 08/21/2012 10:29 AM, cmpilato_at_apache.org wrote:
>> Author: cmpilato
>> Date: Tue Aug 21 17:29:40 2012
>> New Revision: 1375675
>>
>> URL: http://svn.apache.org/viewvc?rev=1375675&view=rev
>> Log:
>> Introduce a new 'init-commit' hook script which runs immediately after
>> the commit txn is created and populated with initial txnprops.
>
> I'm curious where this is used. This is just after the txn is begun but
> before any modifications are made in it?

That's correct. Well, not before *any* modifications are made. The
libsvn_repos-level code which creates commit transactions also sets a bunch
of txnprops (author, date, plus any user-supplied ones such as log messages
or custom revprops) on the newly created transaction. This hook runs
immediately after that initial batch of txnprop changes is made.

> Calling this "init" isn't self documenting, it's not clear where in the
> commit steps it occurs. It doesn't fit in the "pre-" or "post-" convention
> where it's clear where it runs in the order.

I agree that the name isn't ideal.

> Calling this "post-create", "post-txn-create" would be a clearer name. Given
> this hook is infrequently used, I would prefer the later.

I actually considered using "post-create-txn" and renaming "start-commit" to
"pre-create-txn" (with code to run "start-commit" iff not "pre-create-txn"
hook exists, for compat purposes).

Any thoughts on that?

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2012-08-21 20:10:31 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.