Print Current Mercurial Revision Hash?

后端 未结 8 1935
无人共我
无人共我 2020-12-12 20:04

Is there a better way extract the current revision hash in Mercurial than

hg log -l1|grep changeset|cut -d: -f3

?

Part of my webapp depl

8条回答
  •  孤城傲影
    2020-12-12 20:32

    Summarising the answers and their responses, it seems that this is the best way to print the unique (not short form) identifier of the current version:

    hg log -l 1 --template '{node}\n' -r .
    

提交回复
热议问题