[MERGE] Fix race condition with branch hooks during cloning when the new branch is stacked.

Andrew Bennetts andrew.bennetts at canonical.com
Thu Feb 26 03:35:05 GMT 2009


Robert Collins wrote:
> On Wed, 2009-02-25 at 17:33 -0500, Andrew Bennetts wrote:
[...]
> > One comment about the test; when writing tests that do assertions in 
> > callbacks I tend to have the callback do "self.hook_was_called" so that 
> > the test can do self.assertTrue(self.hook_was_called)" to guard against 
> > an accidental gap in test coverage if for some reason the callback isn't 
> > run.  I don't think it's serious risk in this case, but you're welcome 
> > to share my habit ;)
> 
> I do - I assert that we have 1 or 2 calls made to the hook, as
> appropriate :)

So you do.  Nevermind me :)

-Andrew.




More information about the bazaar mailing list