[RFC] Changing the generate_commit_message_template and commit_message_template hook APIs

Robert Collins robertc at robertcollins.net
Fri Sep 11 23:53:55 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gary van der Merwe wrote:
> 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.

Why not just invoke tree.commit directly in qbzr?

I don't see that a 'more clear' definition will help, if the template
code wants to derive data about the commit that /is happening/, unless
you are doing a commit, it will break.

- -Rob

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqq1P8ACgkQ42zgmrPGrq5uRgCdGnXJDHaLH6XwFLTvv/W2RwQ5
910An1R2TkrSFw54EQWglEY9V1x3Evio
=ceCC
-----END PGP SIGNATURE-----



More information about the bazaar mailing list