[MERGE][1.0] New annotate merge that performs well on packs

Robert Collins robertc at robertcollins.net
Mon Dec 3 19:07:33 GMT 2007


On Mon, 2007-12-03 at 13:42 -0500, Aaron Bentley wrote:
> 
> > +        a_ancestry = set(vf.get_ancestry(a_rev))
> > +        b_ancestry = set(vf.get_ancestry(b_rev))
> > +        self.uncommon = a_ancestry.symmetric_difference(b_ancestry)
> > 
> > Are ones we want to avoid in the future, but until our Graph support
> is
> > better about giving us the "symmetric_difference" directly, this is
> > probably fine for now.
> 
> Fully agreed that we want to avoid this in the future.

I would like it if you could do something like this:
a_graph = [get a graph on both vf's]
# This is a new method that just thunks through to your current code
self.uncommon = a_graph.symmetric_difference(a_rev, b_rev)

This just makes it a bit easier to make this code scale well by fixing
one place only.

-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: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071204/045e7abd/attachment.pgp 


More information about the bazaar mailing list