Search code examples
hashmercurialrevision

Print Current Mercurial Revision Hash?


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 deployment script "tags" the uploaded app tarball with its unique revision hash.


Solution

  • Try:

    hg id -i
    

    Example:

    $ hg id -i
    adc56745e928