changeset 15242:dac2edce4e4a

graft: add examples and information about copied metadata
author Matt Mackall <mpm@selenic.com>
date Wed, 12 Oct 2011 18:59:59 -0500
parents e4d135632f6d
children 1e9451476bf8
files mercurial/commands.py
diffstat 1 files changed, 23 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Oct 12 18:48:57 2011 -0500
+++ b/mercurial/commands.py	Wed Oct 12 18:59:59 2011 -0500
@@ -2463,7 +2463,8 @@
     This command uses Mercurial's merge logic to copy individual
     changes from other branches without merging branches in the
     history graph. This is sometimes known as 'backporting' or
-    'cherry-picking'.
+    'cherry-picking'. By default, graft will copy user, date, and
+    description from the source changesets.
 
     Changesets that are ancestors of the current revision, that have
     already been grafted, or that are merges will be skipped.
@@ -2476,6 +2477,27 @@
     .. note::
       The -c/--continue option does not reapply earlier options.
 
+    .. container:: verbose
+
+      Examples:
+
+      - copy a single change to the stable branch and edit its description::
+
+          hg update stable
+          hg graft --edit 9393
+
+      - graft a range of changesets with one exception, updating dates::
+
+          hg graft -D "2085::2093 and not 2091"
+
+      - continue a graft after resolving conflicts::
+
+          hg graft -c
+
+      - show the source of a grafted changeset::
+
+          hg log --debug -r tip
+
     Returns 0 on successful completion.
     '''