Isn't merge commutative?

Kyung-Kook Park gegogi at gmail.com
Mon Jun 21 11:47:30 UTC 2010


> I don't think it's supposed to happen. Do you have a reproduction case ?
> If not maybe you could provide debug logs (run with --debug).

All programmers in my team spent a day to build a small reproduction
case but reached nothing but a conflict which seems natural.

Because it happened on a quite large tree with lots of bidirectional
merges between branches, we still can't find the reason why the files
were replaced silently without a conflict.

When I saw two diffs from the common ancestor to two immediate parents,
they both have same files added with different contents which look like
an apparent conflict.

I'll try --debug and post the result.

Kyung


On Mon, Jun 21, 2010 at 17:14, Benoit Boissinot <bboissin at gmail.com> wrote:
> On Mon, Jun 21, 2010 at 8:46 AM, Kyung-Kook Park <gegogi at gmail.com> wrote:
>> I thought mercurial merge was commutative.
>> But today I met a non-commutative merging case from my repository.
>> The result of merging branch A from branch B was
>> different from that of merging branch B from branch A.
>>
>> What actually happened is modification event in branch A
>> was overwritten by add event in branch B,
>> which resulted in roll-back of several files.
>> But the files are merged as intended, when I changed the
>> direction of merge.
>>
>> How can this happen?
>
> I don't think it's supposed to happen. Do you have a reproduction case ?
> If not maybe you could provide debug logs (run with --debug).
>
> regards,
>
> Benoit
>



More information about the Mercurial mailing list