[MERGE] Added support for a hook before sending the commit message to the editor.
ian.clatworthy at internode.on.net
Wed Jan 30 06:14:55 GMT 2008
Monty Taylor wrote:
> Here's a stab at adding a hook to inject info into the commit message
> before sending to the editor.
This is good. I'm tempted to vote 'tweak' but I think it needs to be
generalised a little or we need to decide explicitly not to do that.
There are two interesting parts in the text sent to the editor:
1. the message text (initially blank)
2. information (similar to bzr status by default)
As proposed, the hook lets one append (only) to the message text (only).
How about passing the current text and information into the hook and
passing the new values back out? That way, the hook could alter either
as it sees fit.
On the tweak front, please update the hooks help/reference
(bzrlib/help_topics/en/hooks.txt) and put spaces around '=' here to meet
> + start_message=""
> + start_message=start_message + \
BTW, this partially fixes https://bugs.launchpad.net/bzr/+bug/99983. (A
'post-commit-message' hook is also needed to call it done if and when
More information about the bazaar