# HG changeset patch # User Matt Mackall # Date 1318463999 18000 # Node ID dac2edce4e4a7eb63ff2c1bb6ab2289c0bcec9e5 # Parent e4d135632f6d94cf8c9bdbeb058724259c61d4f2 graft: add examples and information about copied metadata diff -r e4d135632f6d -r dac2edce4e4a mercurial/commands.py --- 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. '''