[MERGE] iter_changes-based merge
aaron.bentley at utoronto.ca
Tue Jul 10 16:41:15 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Martin Pool wrote:
> Could you please document interesting_ids and interesting_files?
> Could you please say something there about why - if I understand
> correctly, it's that this is meant to enable future performance
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
> + 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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar