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

Re: Should start-commit hook include log message parameter?

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Tue, 15 Jul 2008 14:50:49 -0400

kmradke_at_rockwellcollins.com writes:
> We have implemented some pre-commit and post-commit hook scripts to
> integrate with an internal bug tracking system.
>
> The entered BugID is part of the commit log message. (As setup with
> TortoiseSVN).
>
> We validate that a BugID is valid and open in the pre-commit, but this
> could be better done in the start-commit hook. However, it does not
> get the log message as a parameter, and since the transaction hasn't
> started you can't use svnlook like you can in the pre-commit.
>
> When large transactions are performed (multiple GB), all the data has
> to be transferred before the pre-commit hook can validate and possibly
> reject the BugID. This seems wasteful, in both network bandwidth and
> user time.
>
> Are there any technical reasons or objections why the commit log
> message can not/should not be added as a start-commit hook parameter?

The log message is just one of many revision properties (revprops, i.e.,
unversioned properties attached to revision numbers) that might be
transmitted. Specifically, it's the "svn:log" property.

I don't think the repository has those properties yet at start-commit
time, because they're attached to the subversion txn that is not created
until after start-commit runs.

However, what you say makes sense. It might even be worth it for us to
transmit the log message specially at the front of the commit, just to
allow start-commit to do what you propose. Or send the revprop values
early, create the txn, and *then* run start-commit, giving it access to
the unfinished txn.

Thoughts? Patches? :-)

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-15 20:51:14 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.