通过管道导入 Mercurial 补丁

Mercurial patch import via pipe

我想避免在使用 mercurial 应用补丁时避免磁盘上的文件

而不是./script_gen_diff > diff && hg import diff && rm diff,我希望能够./script_gen_diff | hg import。可能吗 ?文档中没有这样的选项。

There's no such option in the doc

RLLY?!我可以阅读 hg help import 并发现

hg import [OPTION]... PATCH ...

...

To read a patch from standard input, use "-" as the patch name. If a URL
is specified, the patch will be downloaded from there.