[MERGE] Deprecate compare_trees

Martin Pool mbp at canonical.com
Wed Jul 26 09:29:03 BST 2006


On 26 Jul 2006, Robert Collins <robertc at robertcollins.net> wrote:

I know this is just moved code.

> +    def _double_lock(self, lock_source, lock_target):
> +        """Take out too locks, rolling back the first if the second throws."""
                       ~~~

typo.

> +        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
> +

This should really be just 'except:' I think, though I suppose it won't
make a difference until Python 2.5.

Otherwise +1 - but I see you said this is deprecated from 0.10 so  I
guess it should wait to merge in?

-- 
Martin




More information about the bazaar mailing list