[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: Blair Zajac <blair_at_orcaware.com>
Date: Tue, 21 Aug 2012 11:29:27 -0700

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

>> 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.


> Any thoughts on that?
Received on 2012-08-21 20:30:01 CEST

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