On 08/21/2012 11:09 AM, C. Michael Pilato wrote:
> 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.
Is the use case it to check the txn props that aren't available in
start-commit?
>> 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).
+1. I always have to remember which comes first, start-commit or
pre-commit, so this renaming helps.
Blair
>
> Any thoughts on that?
>
Received on 2012-08-21 20:30:01 CEST