How do I get Bzr to run an arbitrary command on commit
I need the ability to run an arbitrary command when I try and commit to a bazaar branc开发者_JAVA技巧h.
This command should return 0 on success, or any other code on failure, and if the command fails, bzr should refuse to commit.
I want to do this for running test suites mainly, however, there are also other things (for example, checking whether there is a freeze on the branch that is trying to be committed, etc etc) that I'd like to be able to do
You need to write a pre_commit hook, check for example:
http://schettino72.wordpress.com/category/testing/
精彩评论