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
As others have pointed out, don't use log -l.
Use hg log -r . to get detailed information, as opposed to using hg id whose output is limited and it does not support templates. You could also create a little alias like here = log -r . and use hg here. If you only want the hash use hg log -r . --template '{node}\n'.
hg log -l 1 --template '{node|short}\n'
See the docs, paragraphs "The basics of templating" and following.