VersionedFile.walk deprecated?
Aaron Bentley
aaron.bentley at utoronto.ca
Wed Apr 12 13:55:39 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> Just to expand on what I said before - the problem with walk() is that
> it returns all lines in the history of the file, even those which are
> irrelevant to the two versions we're trying to merge. Touching them is
> not just specific to weave storage, but an undesirable consequence,
> since we spend time walking lines we can't possibly use.
Okay, but with weaves, we always have to read the weave from
top-to-bottom anyhow, I think.
> We can make a plan_merge for knits which does something similar, but
> only deals with lines which can possibly be in the output. It requires
> annotated knits. It should work like this:
>
> Do a two-way diff between the two versions to be merged. Within the
> difference regions, we need to determine whether each line is unborn,
> live, or killed in the other side. Taking the lines from the
> left-hand-side conflict region first, get the line origins.
Depending on the costs involved, it might be worthwile to diff the
annotated version, to reduce false matches.
> If that
> origin is in the merged-revisions set of the right hand side, then the
> line has been deleted (or moved) on the right hand side. Otherwise,
> it's new on the left hand side.
Yes, that makes sense. Something interesting about this process is it
doesn't seem to use line identity-- only position, text, and possibly
annotation. I suppose it's harder to get identity out of knits, anyhow.
> This can still be improved for some criss-cross merge cases by
> recording when the user explicitly choses a resolution to a conflict,
> but I think this may give comparable results to current weave merge.
An interesting thought. Are you thinking of
http://revctrl.org/MarkMerge and the way it distinguishes between choices?
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEPPjL0F+nu1YWqI0RAir/AJ0dFpuuz7OUZgDUWdRW+g8mPb6dCQCfRKpa
ShK49b+A4PpMOXWTVXHj8yA=
=13X4
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list