有没有更好的方法在Mercurial中提取当前版本哈希值
hg log -l1|grep changeset|cut -d: -f3
?
我的部分webapp部署脚本使用其唯一的修订哈希"标记"上传的应用程序tarball.
是否可以仅针对整个存储库提取单个分支的更改.我们在不同的分支上进行并行开发,不希望从日志中的其他构建进行更改.
hg log -r %baseversion%:%releaseversion% --style changelog >> hglog.txt
Run Code Online (Sandbox Code Playgroud)
我尝试这样做,但它取消了基本标签和发布标签之间的所有变化.
我希望我的“ 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)