[MERGE] iter_changes-based merge
Aaron Bentley
aaron.bentley at utoronto.ca
Tue Jul 10 16:41:15 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> Could you please document interesting_ids and interesting_files?
Sure.
> Could you please say something there about why - if I understand
> correctly, it's that this is meant to enable future performance
> improvements.
That's half of it. The other half is greater consistency, and less
reliance on Tree.inventory.
> + def _three_way(base, other, this):
> + #if base == other, either they all agree, or only THIS has
> changed.
> + if base == other:
> + return 'this'
> + if this not in (base, other):
> + return 'conflict'
> + # "Ambiguous clean merge"
> + elif this == other:
> + return "this"
> + else:
> + assert this == base
> + return "other"
>
> I can't see how that assertion could ever fail at runtime, so you might as
> well remove it and avoid the extra comparison.
If I thought it was likely to fail in normal use, I'd have raised a
proper error instead of asserting. It was partly there for clarity, so
I'll remove it and stick a comment in.
> This looks reasonable to me but because I'm not intimately familiar with
> this code a review from someone else might be good.
Okay, I'll hold off merging for a bit.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGk6ib0F+nu1YWqI0RAl1ZAJ9IcU9jdR75SK3BJuUlKNcHXxImKQCfRGjK
z3pD46h02ZEBFHIiYGaq12Y=
=dSLI
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list