[RFC] Changing the generate_commit_message_template and commit_message_template hook APIs

Gary van der Merwe garyvdm at gmail.com
Fri Sep 11 22:56:22 BST 2009


Hi

I want to add a feature to qcommit that retrieves a commit message
from commit_message_template hooks (so that I can use qcommit and
bzr-builddeb together.) I have put together a proof of concept that
works nicely, which you can find at
lp:~garyvdm/qbzr/read_commit_message_hook. (link to diff:
http://bazaar.launchpad.net/~garyvdm/qbzr/read_commit_message_hook/revision/933)

Currently, when generate_commit_message_template gets called, it gets
passed a bzrlib.Commit object. In qcommit, we never create such an
object (we run bzr commit is a sub process.) In my proof of concept, I
have created a MockCommitObj, which has all the fields that get used
by the bzr-builddeb commit_message_template hook. This seems error
prone, so I would like to change the api to be more cleanly defined.

What other plugins implement commit_message_template hooks, and what
information do they need form the commit object?

Regards,

Gary



More information about the bazaar mailing list