Disable backing out merges?
sterkrig at myopera.com
Sat Oct 8 08:55:43 CDT 2011
Backout operation hardly can do rebase and other destructive things. The
whole idea is that you only *add* changesets, while backing out "bad one".
If you cannot safely push result, it's not backout.
> 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
> Essentially the problem is, that a merge is a special operation which
> later merges, right? A backout then only undoes the content changes, but
> the graph changes.
> a-b-c-x ← broken
> \ /
> A backout of c would need to make x a valid changeset, so it would
> have to
> (a) rebase x on b or d und then close c-x, or cleaner but more complex
> (b) do a new merge of d and b, rebase x on it and then merge x with that,
> discarding the changes from x.
> a-b-c-x † ← closed
> \ /
> d-x' ← OK
> \ \ c'-x'-y ← OK
> \ X /
> \ / c-x ← broken
> y = x - c + c'
> So essentially y is a rebase of x on c', followed by a dummy merge of x
> on x'
> to replicate the graph change.
> If I did not miss something, future merges should then work without
> So actually a backout of a merge is either
> (a) a rebase + close (there should never have been a merge in the first
> (b) a remerge + rebase + dummy merge (merging was the right thing to do,
> the exact merge was bad).
> (a) and (b) should warn everyone who wants to push ancestors of the bad
> because they would introduce a new non-closed head.
> Is this correct?
> Best wishes,
> A man in the streets faces a knife.
> Two policemen are there it once. They raise a sign:
> “Illegal Scene! Noone may watch this!”
> The man gets robbed and stabbed and bleeds to death.
> The police had to hold the sign.
> …Welcome to Europe, citizen. Censorship is beautiful.
> ( http://draketo.de/stichwort/censorship )
Använder Operas banbrytande e-postklient: http://www.opera.com/mail/
More information about the Mercurial-devel