merged two branches, and pushed, how to backout/strip?
Arne Babenhauserheide
arne_bab at web.de
Sun Jan 8 21:55:48 UTC 2017
Uwe Brauer <oub at mat.ucm.es> writes:
> I merged a feature branch into default and pushed. I shouldn't have
> done. If that were a private repo, I would strip and that it is, but now
> how I am supposed to clean up the mess, the graph looks basically like
> this:
>
> @ changeset: 143:ec02f4c5e97e
> |\ tag: tip
> | | parent: 138:7e1a64287b87
> | | parent: 142:1dd731cf6a6a
> | | user: Uwe Brauer <oub at mat.ucm.es>
> | | date: Sun Jan 08 19:42:20 2017 +0000
> | | summary: Merged
> | |
> | o changeset: 142:1dd731cf6a6a
> | | branch: vs-11.89
> | | user: Uwe Brauer <oub at mat.ucm.es>
> | | date: Sun Jan 08 09:57:53 2017 +0000
> | | summary: Update Makefile and style/*.el
>
> 143:ec02f4c5e97e is the unwanted merge. I tried to rebase, but this was
> of course refused.
>
> I might update to the last commit in the default branch, add stuff
> commit and push creating a new head, but are there better solutions?
If the code being in the open is no problem, you can always revert
default to the commit before the merge, then commit, then merge default
into vs-11.89, revert vs-11.89 to the other commit before the merge and
commit again.
hg revert --all -r 138:7e1a64287b87
hg commit -m "backout bad merge"
hg up vs-11.89
hg merge default
hg ci -m "merge default with the backout"
hg revert --all -r 142:1dd731cf6a6a
hg ci -m "backout the backout"
Now from the view of hg, everything should work the same way as before
(including later merges into default and later merges of default into
vs-11.89).
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20170108/fd1b62d4/attachment.asc>
More information about the Mercurial
mailing list