Proposal for new hooks

Martin Pool mbp at canonical.com
Wed Mar 24 23:33:41 GMT 2010


On 25 March 2010 02:01, Marco Pantaleoni <marco.pantaleoni at gmail.com> wrote:
> 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

Thanks very much.

> 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.

Yes, please do.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list