changeset 30899:a8786013f056

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.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 10 Feb 2017 15:26:03 -0800
parents 4d019d0e1b3b
children 23eed7d423b4
files mercurial/commands.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)::