import: mention "stdin" (abbreviated) and add example
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 10 Feb 2017 15:26:03 -0800
changeset 30899 a8786013f056
parent 30898 4d019d0e1b3b
child 30900 23eed7d423b4
import: mention "stdin" (abbreviated) and add example I actually didn't even think it was possible because I searched the help text for "stdin", and didn't even think of searching for "standard input". Let's mention the abbreviated form too to help others like me. (When importing from stdin, we actually print a message saying "applying patch from stdin".) This patch also adds an example showing how to import from stdin.
mercurial/commands.py
--- a/mercurial/commands.py	Thu Feb 09 09:32:25 2017 -0800
+++ b/mercurial/commands.py	Fri Feb 10 15:26:03 2017 -0800
@@ -4129,8 +4129,9 @@
     Import a list of patches and commit them individually (unless
     --no-commit is specified).
 
-    To read a patch from standard input, use "-" as the patch name. If
-    a URL is specified, the patch will be downloaded from there.
+    To read a patch from standard input (stdin), use "-" as the patch
+    name. If a URL is specified, the patch will be downloaded from
+    there.
 
     Import first applies changes to the working directory (unless
     --bypass is specified), import will abort if there are outstanding
@@ -4200,6 +4201,10 @@
 
           hg import incoming-patches.mbox
 
+      - import patches from stdin::
+
+          hg import -
+
       - attempt to exactly restore an exported changeset (not always
         possible)::