Proposal for new hooks

Marco Pantaleoni marco.pantaleoni at gmail.com
Wed Mar 24 15:01:15 GMT 2010


Hi,
after asking for this functionality (
https://answers.launchpad.net/bzr/+question/105308), I added the following
hooks to Bazaar:

 * post_branch - called when a new branch is created
 * post_switch - called after a checkout is switched to a different branch
 * post_repo_init - called after a repository has been created

These can be useful for example to write an application that keeps track of
branches, checkouts and repositories (which is what I am doing btw).

The changes are quite simple. I also added test cases for the three hooks.
If you want to give a look, I uploaded the branch on Launchpad as:

  lp:~marco-pantaleoni/bzr/new_branch_and_repo_hooks

(It's page is
https://code.launchpad.net/~marco-pantaleoni/bzr/new_branch_and_repo_hooks)

Please let me know what do you think. If you believe this could be
integrated upstream, I'll propose its merging.
TIA,
Marco

-- 
Marco Pantaleoni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20100324/5f48b15b/attachment.htm 


More information about the bazaar mailing list