Comment 3 for bug 186422

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 186422] [NEW] Ability to modify the tree from a pre-commit hook

On Sun, 2008-01-27 at 19:24 +0000, Jelmer Vernooij wrote:
> Public bug reported:
>
> affects bzr
>
> For etckeeper, I need to use a hook in "bzr commit" that could change
> the tree that is being committed. This is not possible using the current
> pre_commit hook.
>
> Perhaps it would be possible to split up pre_commit hook into a hook run
> right before the commit is started and a hook that is being run after
> the delta has been determined?
>
> The first hook could still allow changing of the tree.

I don't think splitting is needed - just adding a new hook should suffice.

Some care will be needed to avoid locking and race conditions;
particularly if non-python hooks are anticipated for this.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.