import: add help examples
authorMatt Mackall <mpm@selenic.com>
Fri, 16 Sep 2011 17:08:18 -0500
changeset 15113 b55129f7f039
parent 15112 24f5489452af
child 15114 d1bbabf7d35d
import: add help examples
mercurial/commands.py
--- a/mercurial/commands.py	Fri Sep 16 16:52:45 2011 -0500
+++ b/mercurial/commands.py	Fri Sep 16 17:08:18 2011 -0500
@@ -3135,6 +3135,27 @@
     a URL is specified, the patch will be downloaded from it.
     See :hg:`help dates` for a list of formats valid for -d/--date.
 
+    .. container:: verbose
+
+      Examples:
+
+      - import a traditional patch from a website and detect renames::
+
+          hg import -s 80 http://example.com/bugfix.patch
+
+      - import a changeset from an hgweb server::
+
+          hg import http://www.selenic.com/hg/rev/5ca8c111e9aa
+
+      - import all the patches in an Unix-style mbox::
+
+          hg import incoming-patches.mbox
+
+      - attempt to exactly restore an exported changeset (not always
+        possible)::
+
+          hg import --exact proposed-fix.patch
+
     Returns 0 on success.
     """
     patches = (patch1,) + patches