comparison mercurial/commands.py @ 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 441705506d24
children 455677a7667f
comparison
equal deleted inserted replaced
30898:4d019d0e1b3b 30899:a8786013f056
4127 """import an ordered set of patches 4127 """import an ordered set of patches
4128 4128
4129 Import a list of patches and commit them individually (unless 4129 Import a list of patches and commit them individually (unless
4130 --no-commit is specified). 4130 --no-commit is specified).
4131 4131
4132 To read a patch from standard input, use "-" as the patch name. If 4132 To read a patch from standard input (stdin), use "-" as the patch
4133 a URL is specified, the patch will be downloaded from there. 4133 name. If a URL is specified, the patch will be downloaded from
4134 there.
4134 4135
4135 Import first applies changes to the working directory (unless 4136 Import first applies changes to the working directory (unless
4136 --bypass is specified), import will abort if there are outstanding 4137 --bypass is specified), import will abort if there are outstanding
4137 changes. 4138 changes.
4138 4139
4197 hg import https://www.mercurial-scm.org/repo/hg/rev/5ca8c111e9aa 4198 hg import https://www.mercurial-scm.org/repo/hg/rev/5ca8c111e9aa
4198 4199
4199 - import all the patches in an Unix-style mbox:: 4200 - import all the patches in an Unix-style mbox::
4200 4201
4201 hg import incoming-patches.mbox 4202 hg import incoming-patches.mbox
4203
4204 - import patches from stdin::
4205
4206 hg import -
4202 4207
4203 - attempt to exactly restore an exported changeset (not always 4208 - attempt to exactly restore an exported changeset (not always
4204 possible):: 4209 possible)::
4205 4210
4206 hg import --exact proposed-fix.patch 4211 hg import --exact proposed-fix.patch