merge uses wrong ancestor (and consequently does the wrong thing)

Benoit Boissinot bboissin at gmail.com
Mon Oct 6 09:58:59 CDT 2008


On Mon, Oct 06, 2008 at 04:33:05PM +0200, Stefan Ring wrote:
> Mads Kiilerich wrote:
>> Benoit Boissinot wrote:
>>> hg init
>>> echo a > a
>>> hg ci -Am m
>>> echo b >> a
>>> hg ci -Am m
>>> echo a > a
>>> hg ci -Am m
>>> hg up 0
>>> echo b >> a
>>> hg ci -Am m
>>> hg view
>>> hg merge --debug
>>> cat a
>>>
>>> You'll get 'a\n' instead of 'a\nb\n'.
>>>
>>> Can you open a bugreport please ?
>>>   
>>
>> I think that is exactly the same as reported in  
>> http://www.selenic.com/mercurial/bts/issue1295 msg7148?
>>
>> With premerge I get what I think is the right behaviour - try
>> hg --config merge-tools.kdiff3.premerge=False merge
>
> I already tried that; it doesn't help at all. The merge tool is invoked  
> with the wrong ancestor.
>
By the way, one way to work around this is if instead of reverting you
did a backout,
and if backout did a merge (even when the history is linear,
which is not the
case currently).
Then the correct node would be picked.

we would have:

 X
/|\
|Y Y
\|
 X

And then the ancestor would be X.

But it's more a hack than anything :/

regards,

Benoit
-- 
:wq


More information about the Mercurial mailing list