changeset 15111:0be86ec3cafe

export: add help examples
author Matt Mackall <mpm@selenic.com>
date Fri, 16 Sep 2011 16:40:27 -0500
parents 7ebf60dbfa46
children 24f5489452af
files mercurial/commands.py
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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', []))