Patchwork [v3] backout: add examples to clarify basic usage

login
register
mail settings
Submitter Mathias De Maré
Date Nov. 25, 2015, 4:45 p.m.
Message ID <252a1af424ad7b440fec.1448469952@waste.org>
Download mbox | patch
Permalink /patch/11659/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Mathias De Maré - Nov. 25, 2015, 4:45 p.m.
# HG changeset patch
# User Mathias De Maré <mathias.demare@gmail.com>
# Date 1443764903 -7200
#      Fri Oct 02 07:48:23 2015 +0200
# Node ID 252a1af424ad7b440fecd18b5c187c4ac4c8df66
# Parent  61fbf5dc12b23e7a2a30cf04ebd9f096c42a1f61
backout: add examples to clarify basic usage
Yuya Nishihara - Nov. 28, 2015, 2:32 p.m.
On Wed, 25 Nov 2015 10:45:52 -0600, Mathias De Maré wrote:
> # HG changeset patch
> # User Mathias De Maré <mathias.demare@gmail.com>
> # Date 1443764903 -7200
> #      Fri Oct 02 07:48:23 2015 +0200
> # Node ID 252a1af424ad7b440fecd18b5c187c4ac4c8df66
> # Parent  61fbf5dc12b23e7a2a30cf04ebd9f096c42a1f61
> backout: add examples to clarify basic usage
> 
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -486,6 +486,23 @@
>  
>      .. container:: verbose
>  
> +      Examples:
> +
> +      - Reverse the effect of the parent of the working directory.
> +        This backout will be committed immediately::
> +
> +        hg backout -r .

Missing indent. Fixed in flight and pushed to the clowncopter. Thanks for
updating this series.

> +
> +      - Reverse the effect of previous bad revision 23::
> +
> +          hg backout -r 23
> +          hg commit -m "Backout revision 23"
> +
> +      - Reverse the effect of previous bad revision 23 and
> +        commit the backout immediately::
> +
> +          hg backout -r 23 --commit
> +
>        By default, the pending changeset will have one parent,
>        maintaining a linear history. With --merge, the pending
>        changeset will instead have two parents: the old parent of the
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -486,6 +486,23 @@ 
 
     .. container:: verbose
 
+      Examples:
+
+      - Reverse the effect of the parent of the working directory.
+        This backout will be committed immediately::
+
+        hg backout -r .
+
+      - Reverse the effect of previous bad revision 23::
+
+          hg backout -r 23
+          hg commit -m "Backout revision 23"
+
+      - Reverse the effect of previous bad revision 23 and
+        commit the backout immediately::
+
+          hg backout -r 23 --commit
+
       By default, the pending changeset will have one parent,
       maintaining a linear history. With --merge, the pending
       changeset will instead have two parents: the old parent of the