[MERGE] call commit hooks with correct local branch (for unbound branches)

Marius Kruger amanic at gmail.com
Fri Jan 2 15:12:11 GMT 2009


hi,

I'm trying to write a pre_commit hook, but when it is called,
it seems that the local and master branch are the wrong way around.
looking at bzrlib.commit._process_hooks I see:
around line 543:
        # new style commit hooks:
        if not self.bound_branch:
            hook_master = self.branch
            hook_local = None
        else:
            hook_master = self.master_branch
            hook_local = self.branch

this looks wrong to me, but I might be missing something.
I attached a patch which fixes it for me.
I could not find tests for this so I added one.

regards
marius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090102/17978b44/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20090102170314-bzr.commit_hooks.patch
Type: text/x-diff
Size: 7937 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090102/17978b44/attachment.bin 


More information about the bazaar mailing list