Ability to modify the tree from a pre-commit hook
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Bazaar |
Wishlist
|
Jelmer Vernooij |
Bug Description
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.
--
Jelmer Vernooij <email address hidden> - http://
Jabber: <email address hidden>
Changed in bzr: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Ian Clatworthy (ian-clatworthy) wrote : | #1 |
Jelmer Vernooij (jelmer) wrote : Re: [Bug 186422] Re: Ability to modify the tree from a pre-commit hook | #2 |
Am Mittwoch, den 30.01.2008, 07:17 +0000 schrieb Ian Clatworthy:
> I think the hook that permits changing the tree ought to be called
> start_commit. FWIW, Subversion has a hook called this. (It would be nice
> if our hook followed a similar signature to make it easier for teams
> switching from Subversion to Bazaar, assuming the signature meets our
> needs.)
Yep, subversion does indeed have a "start-commit" hook for this moment,
but it doesn't appear to guarantee that there's a working tree around
that the user can use.
Of course, that doesn't stop us from making it available though.
Cheers,
Jelmer
--
Jelmer Vernooij <email address hidden> - http://
Jabber: <email address hidden>
Robert Collins (lifeless) wrote : Re: [Bug 186422] [NEW] Ability to modify the tree from a pre-commit hook | #3 |
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://
James Westby (james-w) wrote : | #4 |
Hi,
We now have a start_commit hook, can this bug be closed?
Thanks,
James
Changed in bzr: | |
assignee: | nobody → jelmer |
status: | Triaged → Fix Released |
I think the hook that permits changing the tree ought to be called start_commit. FWIW, Subversion has a hook called this. (It would be nice if our hook followed a similar signature to make it easier for teams switching from Subversion to Bazaar, assuming the signature meets our needs.)