# HG changeset patch # User Matt Mackall # Date 1316209227 18000 # Node ID 0be86ec3cafed3493820381db06cab0293f8eea8 # Parent 7ebf60dbfa46c185014a5f009ec2b09b17b68114 export: add help examples diff -r 7ebf60dbfa46 -r 0be86ec3cafe mercurial/commands.py --- a/mercurial/commands.py Fri Sep 16 16:39:55 2011 -0500 +++ b/mercurial/commands.py Fri Sep 16 16:40:27 2011 -0500 @@ -2281,6 +2281,25 @@ With the --switch-parent option, the diff will be against the second parent. It can be useful to review a merge. + .. container:: verbose + + Examples: + + - use export and import to transplant a bugfix to the current + branch:: + + hg export -r 9353 | hg import - + + - export all the changesets between two revisions to a file with + rename information:: + + hg export --git -r 123:150 > changes.txt + + - split outgoing changes into a series of patches with + descriptive names:: + + hg export -r "outgoing()" -o "%n-%m.patch" + Returns 0 on success. """ changesets += tuple(opts.get('rev', []))