pointers on writing a commit hook

John Arbash Meinel john at arbash-meinel.com
Sat May 12 19:19:44 UTC 2012


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

On 5/12/2012 4:32 PM, Wichmann, Mats D wrote:
> 
...

> Is it a better idea to just warn out?  "hey, you made changes but
> you don't seem to have bumped the version info, did you want to
> abort and go back to do that"?
> 
> Are there examples somewhere of code using a start_commit hook so I
> could see how one walks the MutableTree object to find
> information?
> 

I think that is pretty much your options. Either we've computed the
changes, and you need to have a go/no-go check, or you compute the
changes you care about before we get to that point so that you can do
your own changes.

If the common case is people getting it wrong, I would do the
start_commit hook. If it is rare, but something you want to catch, I
would make it a pre_commit hook.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+ut9AACgkQJdeBCYSNAANsCQCgoGgNVYZfHPOtMpxkkuhwzkah
YS4AoLswVXZ5ySTs/zym6LPoPwrYMjHt
=S+5n
-----END PGP SIGNATURE-----



More information about the bazaar mailing list