[MERGE] new merge-type=lca

Aaron Bentley aaron at aaronbentley.com
Sat Dec 29 16:26:01 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> Aaron Bentley пишет:
>> When we are done going through each LCA version, each unique line will
>> be in at least one of the sets.
> 
> You wrote "unique line". How you decide to determine line uniqueness and
> ensure that it's the same line in BASE/THIS/OTHER.

Since we don't have line identity (see below :-), we can't determine
this in an absolute way (and neither can other 3-way text mergers).  But
we do have a great sequence matcher, so we use that.  It identifies
common lines based on their content and their context, because it finds
the longest common subsequence.  So a line is "unique" if it isn't found
to be part of the longest common subsequence.

>> Now in three-way merging, we typically talk about regions of text.  In
>> weave/knit/newness/lca merge, we also have regions.  Each contiguous
>> group of "unchanged" lines is a region, and the areas between them are
>> also regions.
> 
> So, LCA will use regions as well?

Yes.  It uses them when deciding whether to emit a conflict or a clean
merge.  (weave/knit/newness merge also do this.)

Text comparison time should scale
>> mO(n^2), where m is the number of LCAs, and m is the number of lines in
>> the file.  
> 
> I assume here, n -- is the number of lines.

Oops, yes.

> I did not know about line identity in weaves. Why this concept was
> dropeed? Performance reasons?

I am really not sure.  I believe line identity could have been given by
including the line number in the annotation information, so I don't
think performance would be visibly affected.  When I originally came up
with the idea of "append-only weaves", there was a concept of line
identity.  When "append-only weaves" became "knits", the idea was
dropped.  Perhaps Martin could explain.

Line identity is not without flaws.  First, it is determined by sequence
matching, so it is not completely exact.  Second, it can lead to match
failures if a line is removed and then restored.  Finally, since it
relies on information not normally visible to the user, it can be confusing.

> PS: One side question from non-english man.
> You wrote: "I'm very excited about it, so grab a coffee, and I'll yabber
> on." What "yabber" means?

"Yabber" means to talk quickly and say things that are nonsense or
stupid, without stopping.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHdnUZ0F+nu1YWqI0RAsh0AJwKdALiRhWOS+8HaQA554gQz1toowCfZKxC
hw2+xAFY60CpZVWJATj4OpQ=
=3pCi
-----END PGP SIGNATURE-----



More information about the bazaar mailing list