[MERGE] Merge now warns when it encounters a criss-cross

John Arbash Meinel john at arbash-meinel.com
Fri Nov 30 16:04:09 GMT 2007


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

Aaron Bentley wrote:
> John Arbash Meinel wrote:
>> Aaron Bentley wrote:
>>> Michael Hudson wrote:
>>>> Martin Pool wrote:
>>>>> Maybe we can come up with a better message though:
>>>>>
>>>>> +                warning('Warning: criss-cross merge encountered.')
>>>>>
>>>>> So ok, the user now feels warned.  What are they to do?  If you could
>>>>> tell them what they should do, or what the consequences are, or how to
>>>>> avoid it, that would be better.
>>> Well, I'm sort-of caught.  Normally in criss-cross merging situations, I
>>> recommend using merge --weave.  But with packs, this is not really a
>>> realistic option.
>>> I'm gonna see if I can implement per-file merge bases as a behavior that
>>> happens when a criss-cross is encountered.  That would reduce the
>>> consequences of criss-cross merge.
>> Would it be reasonable to do this even in the absence of criss-cross? I realize
>> it is much more needed there, but I'm wondering if we couldn't get slightly
>> fewer conflicts if we did it all the time. (I suppose if there isn't a criss
>> cross, we would expect the per-file graph to be uninteresting?)
> 
> My intuition is that the per-file graph would select the same base text
> as the revision graph, but I haven't sat down and worked it out.  And it
> will be slower than the normal mechanism, because we'll have to
> determine the tree base revision for inventory merging, as well as
> multiple per-file base revisions.

Yeah. I was wondering if the per-file base revisions would be pretty fast if
you seeded it with the global base. Basically, you know you don't have to
traverse all of the file graph history. Just the subset inside the whole-graph
ancestry. If you are only checking 10 nodes, it shouldn't be much slower.

But as you say, if the ancestry isn't complicated, it should spit out the same
ancestor. Which means you don't gain much (and if there are 1000 files
modified, even a fast check starts to add cost).

John
=:->

> 
>>> Should I refer to local docs? "Warning: criss-cross merge encountered.
>>> See "Criss-cross merging" in the User Guide"?
> 
>> Well, you can have it as a help topic. And then they can do:
> 
>> bzr help criss-cross-merge
> 
> Good call.  I'll do that.
> 
> Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHUDR4JdeBCYSNAAMRAiquAKCYE1vRUXRSha4WVGpTMr0b00Ex0wCg16NO
eZ8Ga9TnIYiBj+CdMpD7G+U=
=x0VK
-----END PGP SIGNATURE-----



More information about the bazaar mailing list