Search code examples
mercurial

How to get the "dirty plus" with hg log --template?


hg log -l1 -r . --template {node}

Will give you the full changeset hash for your current working directory, but how do I get the + on the end to indicate that your copy is dirty (uncomitted changes) like hg id does?


Solution

  • Use hg id -i; if you want the full hash, add --debug. (hg log does not examine the work-tree and hence has no idea whether it's dirty.)