changeset 27118:7a95c1e07487

backout: add examples to clarify basic usage
author Mathias De Maré <mathias.demare@gmail.com>
date Fri, 02 Oct 2015 07:48:23 +0200
parents ad2627f4af27
children 2725d62ac632
files mercurial/commands.py
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Nov 25 06:10:54 2015 +0000
+++ b/mercurial/commands.py	Fri Oct 02 07:48:23 2015 +0200
@@ -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