changeset 15113:b55129f7f039

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