[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: <kmradke_at_rockwellcollins.com>
Date: Tue, 15 Jul 2008 14:18:38 -0500

Karl Fogel <kfogel_at_red-bean.com> wrote on 07/15/2008 01:50:49 PM:
> 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? :-)

I wasn't even going to *think* about a patch until someone validated my
thoughts a little. (Thanks for that part...)

svn:author is already passed to the start-commit script, so there is
a little precedence here. If the svn:log message is passed to
the start-commit script it might get a little interesting making sure
the free-form text is passed and parsed correctly.

Not sure I'm real happy with creating an unfinished transaction either.
(However, this would allow us to essentially send all the props and
 easily add new ones in the future without adding parameters to the
 script.)

pre-pre-commit? post-start-commit? :^)

Kevin R.

---------------------------------------------------------------------
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 21:18:56 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.