export: add help examples
authorMatt Mackall <mpm@selenic.com>
Fri, 16 Sep 2011 16:40:27 -0500
changeset 15111 0be86ec3cafe
parent 15110 7ebf60dbfa46
child 15112 24f5489452af
export: add help examples
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', []))