Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial替代了以下git log命令_Git_Mercurial - Fatal编程技术网

Mercurial替代了以下git log命令

Mercurial替代了以下git log命令,git,mercurial,Git,Mercurial,我想知道Mercurial中是否有兼容的git log命令替代品: git log--pretty=oneline--parents--name only--reverse 谢谢。这是我用--template: $hg log--模板“{rev}:{node | short}{parents}{desc | firstline}\n{files}\n” 产生: 15047:8050db40bc5a 15045:7f504202cb5c ui: pass ' ' to raw_input when

我想知道Mercurial中是否有兼容的git log命令替代品:

git log--pretty=oneline--parents--name only--reverse


谢谢。

这是我用
--template
:

$hg log--模板“{rev}:{node | short}{parents}{desc | firstline}\n{files}\n”

产生:

15047:8050db40bc5a 15045:7f504202cb5c ui: pass ' ' to raw_input when prompting
mercurial/ui.py
15046:c019df62de45 15043:0bb0f807dfc3 15045:7f504202cb5c merge with stable
mercurial/commands.py mercurial/help/config.txt
15045:7f504202cb5c help/config: strip trailing whitespace
mercurial/help/config.txt

使用,您可以自定义将
父项
打印为完整哈希的方式,并将
文件
的分隔符更改为新行。

使用以下命令使其正常工作:

log --debug -r : --style my.style
my.style的内容:

changeset = "{node} {parents} {desc|firstline}\n{files}\n"
file  = "{file}\n"
parent = "{node} "

输出几乎和我发布的git命令相同,但有一个例外:您的解决方案生成的输出与最初的git日志版本非常不同,之后会有一个奇怪的空格。尽管如此,还是谢谢。请显示Git的输出,以防有人使用Mercurial而不是Git。