[MERGE] Fix race condition with branch hooks during cloning when the new branch is stacked.
Andrew Bennetts
andrew.bennetts at canonical.com
Wed Feb 25 22:33:20 GMT 2009
Andrew Bennetts has voted approve.
Status is now: Approved
Comment:
Looks like a reasonable and simple fix. It makes sense to me that
Branch.clone should be able to set the stacking details of the branch.
I'm not sure that passing a RepositoryPolicy is the best API, but I
think it's good enough.
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 ;)
For details, see:
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C1235600327.24285.69.camel%40lifeless-64%3E
Project: Bazaar
More information about the bazaar
mailing list