我希望我的“ hg h”(hg日志别名的输出)显示历史记录/日志中当前正在运行的修订版本。
在我的.hgrc上,我有以下内容:
[alias]
h = log --template "{rev} {node|short} {date|shortdate} | [{author|user}] {desc|strip|firstline} :: {tags}\n"
Run Code Online (Sandbox Code Playgroud)
这是一个示例输出:
$ hg h
1 f130b4194c90 2011-07-21 | [slashfoo] added a comment :: tip
0 f4b4ec3c8c95 2011-07-21 | [slashfoo] initial commit ::
Run Code Online (Sandbox Code Playgroud)
但是,如果我更新到修订版0,输出仍然相同:
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg h
1 f130b4194c90 2011-07-21 | [slashfoo] added a comment :: tip
0 f4b4ec3c8c95 2011-07-21 | [slashfoo] initial commit ::
Run Code Online (Sandbox Code Playgroud)
所需的输出示例为:
$ hg …Run Code Online (Sandbox Code Playgroud)