[PATCH] backout: add example of backing out a merge changeset
Mathias De Maré
mathias.demare at gmail.com
Wed Sep 30 00:43:37 CDT 2015
On Wed, Sep 30, 2015 at 7:35 AM, Mathias De Maré <mathias.demare at gmail.com>
wrote:
> # HG changeset patch
> # User Mathias De Maré <mathias.demare at gmail.com>
> # Date 1443590812 -7200
> # Wed Sep 30 07:26:52 2015 +0200
> # Node ID 5a00a9ab705848b7de45b4263ed0bbab29494e29
> # Parent 46af0adb5c375cc51ce0d29cbdcd8ba843a33425
> backout: add example of backing out a merge changeset
>
Besides adding this example, I'd also like to undeprecate the '--parent'
flag.
The flag was deprecated in 1209de02034e with the following description:
> backout: deprecate/hide support for backing out merges
>
> This has never worked usefully:
>
> - it can't undo a completely unwanted merge, as it leaves the merge in the
> DAG
>
> - it can't undo a faulty merge as that means doing a merge correctly,
> not simply reverting to one or the other parent
>
> Both of these kinds of merge also require coordinated action among
> developers to avoid the bad merge continuing to affect future merges,
> so we should stop pretending that backout is of any help here.
>
> As backing out a merge now requires a hidden option, it can't be done
> by accident, but will continue to 'work' for anyone who's already
> dependent on --parent for some unknown reason.
>
>
I think the below use case is can be solved using 'backout --parent', and I
don't see any alternatives that handle this in a simple way.
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -495,6 +495,19 @@
> cancel the merge and leave the child of REV as a head to be
> merged separately.
>
> + Examples:
> +
> + - do a backout of a merge changeset 33 that was created from
> + a good changeset 22 and a bad changeset 11::
> +
> + hg backout -r 33 --parent 22
> + hg commit -m "Backout of merge 33 to parent 22"
> +
> + After the backout, all of the changes on
> + the good side of the merge (the side of changeset 22 and
> ancestors)
> + are kept, while the changes on the bad side of the merge
> + (the side of changeset 11 and ancestors) are backed out.
> +
> See :hg:`help dates` for a list of formats valid for -d/--date.
>
> Returns 0 on success, 1 if nothing to backout or there are unresolved
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150930/e8e4713f/attachment.html>
More information about the Mercurial-devel
mailing list