Disable backing out merges?

Matt Mackall mpm at selenic.com
Sat Oct 8 12:45:51 CDT 2011


On Sat, 2011-10-08 at 15:19 +0200, Arne Babenhauserheide wrote:
> Am Donnerstag, 6. Oktober 2011, 16:03:48 schrieb Matt Mackall:
> > On Thu, 2011-10-06 at 22:45 +0200, Arne Babenhauserheide wrote:
> > > The only way to get rid of them after subsequent pushed commits are
> > > clean
> > > backouts.
> > 
> > ..except we know this doesn't actually work for merges and causes lots
> > of pain.
>> > > Or fix the backout logic?
>  
> > I have no idea how to do that, and I actually suspect that a
> > satisfactory answer doesn't exist. If you know better, I'm ready to be
> > impressed.
> 
> Essentially the problem is, that a merge is a special operation which affects 
> later merges, right? A backout then only undoes the content changes, but not 
> the graph changes. 
> 
> a-b-c-x ← broken
>  \   /
>    d
> 
> A backout of c would need to make x a valid changeset,

I lost you right here. There are two completely different cases I'm
interested in:

a) merge should not have been done at all (ie merged default into
stable)
b) merge was done incorrectly (ie accidentally dropped changes)

This doesn't appear to be either of those. Backing out a non-merge
changeset like c is generally not a problem:

1) update to c
2) revert to b
3) update to x (which does an implicit merge)
4) commit e = x + (b - c)

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list