[MERGE] Refactor diffing

Robert Collins robertc at robertcollins.net
Sun Nov 25 22:04:17 GMT 2007


On Sun, 2007-11-25 at 16:54 -0500, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Robert Collins wrote:
> > I'm really happy with this code. The only remaining thing I think could
> > be improved would be for the factory signature to take DiffTree rather
> > than the individual trees. Then DiffKindChange can share the signature
> > and there's no need to special case it.
> 
> I've added a from_diff_tree factory to each Diff class.  But as you can
> see, it doesn't simplify things too much.

I was actually thinking that __init__ would be changed rather than a
separate method :). Still, this promotes looser coupling I guess.

+1 on this tweak though, I think its good.

-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/20071126/a4a4aa27/attachment.pgp 


More information about the bazaar mailing list