Disable backing out merges?

Matt Mackall mpm at selenic.com
Mon Oct 10 11:28:07 CDT 2011


On Mon, 2011-10-10 at 09:03 +0200, Dominik Psenner wrote:
> >-----Original Message-----
> >From: mercurial-devel-bounces at selenic.com [mailto:mercurial-devel-
> >bounces at selenic.com] On Behalf Of Matt Mackall
> >Sent: Saturday, October 08, 2011 7:46 PM
> >To: Arne Babenhauserheide
> >Cc: mercurial-devel at selenic.com
> >Subject: Re: Disable backing out merges?
> >
> >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)
> 
> I would distinguish in both cases whether the merge has produced some
> valuable stuff or not.
> 
> A) If it does not include any valuable changes, it would not make sense to
> keep the history of the bad merge and therefore I would strip the merge
> changeset and ban it to produce a dag like:
> 
> a-b-c-e      a-b-e'
>  \ /     =>   \
>   d            d

Stop right there: there is no such thing as 'strip' in this discussion. 

First, strip doesn't exist in core.

Second, you can't 'push' the effect of a strip, so even if it did exist,
it can't help you when you've pushed a merge you shouldn't have.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list