plugin not working on lightweight checkouts

Sebastien Alaiwan sebastien.alaiwan at
Mon Nov 30 07:00:36 UTC 2015

On 2015-11-30 07:57, Chris Hecker wrote:
> On 2015-11-29 22:55, Joshua Judson Rosen wrote:
>> On 11/29/2015 05:24 AM, Chris Hecker wrote:
>>>> I was expecting it to react on "bzr update" and "bzr commit".
>>>> However, it only seems to react on "bzr commit".
>>> Yeah, exactly, this is why I started the thread.  :)
>>> Thanks for looking into it...hopefully there's a hook we can use?
>> I think in order to catch updates to the _working tree_
>> that don't changes to the _branch_ (as is the case for "bzr update"),
>> you need to also establish a MutableTree hook--something like this:
>>     mutabletree.MutableTree.hooks.install_named_hook('post_transform',
>>                                                      update_revno_file,
>>                                                      'Update "revno" file on working-tree update')
>> Note that you'll need to change your update_revno_file() function
>> for that to work, because it'll be called with different
>> parameters than its currently expecting, but that's a starting point.
>> Actually, you probably want to just use the various MutableTree hooks
>> (MutableTree 'post_commit' + MutableTree 'post_transform'),
>> and _not_ use the Branch hook. It looks like you're only interested
>> in catching changes to working trees--not to branches per se;
>> i.e.: you do not want to catch new revisions being pushed/pulled
>> into a branch that _doesn't_ have a working tree
>> (which the branch 'post_change_branch_tip' hook _will_ catch).
> It looks like that's the one Sebastien tested that didn't work, it hooked too early?
Yes, "post_transform" is the hook I used in my other email (in this thread, Nov 29).
However, it seems you can't get the destination revision of "bzr update" from this hook.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the bazaar mailing list