[MERGE] Deprecate compare_trees

Robert Collins robertc at robertcollins.net
Wed Jul 26 23:31:57 BST 2006


On Wed, 2006-07-26 at 17:13 -0500, John Arbash Meinel wrote:

> > +    def _double_lock(self, lock_source, lock_target):
> > +        """Take out too locks, rolling back the first if the second throws."""
> > +        lock_source()
> > +        try:
> > +            lock_target()
> > +        except Exception:
> > +            # we want to ensure that we don't leave source locked by mistake.
> > +            # and any error on target should not confuse source.
> > +            self.source.unlock()
> > +            raise
> > +
> 
> By your description of python2.5 issues (KeyboardInterrupt not being
> caught by Exception), it would seem that this should be a bare 'except:'
> 
> Otherwise it looks good to me.

Thanks. I am keeping to the 'only change what I'm testing' approach -
I'm pulling this code up from a child class, but not changing it at all
- I find that commingling changes makes things harder to be sure of.
Also, we have to audit the code base anyway, so ...

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060727/0aa509a2/attachment.pgp 


More information about the bazaar mailing list