Backing out a merge - consequences?
Matt Mackall
mpm at selenic.com
Thu Jul 10 17:37:01 UTC 2014
On Thu, 2014-07-10 at 10:30 -0400, Tom Udale wrote:
> Greetings,
>
> We have a situation where a feature branch was inappropriately merged
> (and pushed, of course) into the default branch.
>
> I have on my local machine run
>
> hg backout -r 1234 --parent 1233
>
> which has dutifully put my local repo back at the state of rev 1233.
The "backing out a merge" behavior was so broken, we deprecated it in
2011. Don't use it.
While it has the desired effect on the _contents_ of your changeset, it
can't unrecord that a merge happened in your history graph. Since the
merge is still there, but with a "null" result, future merges will be
confused and dutifully undo the same changes.
To fix it, you need to commit a correct merge above the backed-out merge
and force all users to update past it so that future merges won't be
confused.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list