Backing out a merge - consequences?
Becker, Mischa J
mischa.becker at kroger.com
Thu Jul 10 18:56:58 UTC 2014
> -----Original Message-----
> From: mercurial-bounces at selenic.com [mailto:mercurial-
> bounces at selenic.com] On Behalf Of Tom Udale
> Sent: Thursday, July 10, 2014 11:41 AM
> To: Matt Mackall
> Cc: mercurial at selenic.com
> Subject: Re: Backing out a merge - consequences?
>
> Hi Matt,
>
> >> 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.
>
> I had a feeling something like this was afoot.
>
>
>
> > 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.
>
> This is what I have:
>
> o 1234 default - "premature merge w\feature"
> |\
> o \ 1233 default
> | \
> | o 1232 feature
> | |
>
>
> If I understand what you are suggesting, you are saying to do something
> like this:
>
>
> | o 1236 default - tag "DO NOT Use Me!!"
> o | 1235 default - tag "Use Me!!"
> \ |
> \ o 1234 default - "premature merge w\feature"
> \|\
> o \ 1233 default
> | \
> | o 1232 feature
> | |
>
It might be better to close the branch after the bad merge so you don't have two heads on default.
| = 1236 default - Close branch "Premature merge"
o | 1235 default - tag "Use Me!!"
\ |
\ o 1234 default - "premature merge w\feature"
\|\
o \ 1233 default
| \
| o 1232 feature
| |
Mischa
________________________________
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential and protected by law from unauthorized disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
More information about the Mercurial
mailing list