How can I find my working revision in mercurial

Solution 1:

This command:

hg parent

Solution 2:

In addition to hg parents, you can use hg summary to get the most important summary information about your current state. It looks like this:

% hg summary
parent: 13051:120eccaaa522 tip
 encoding: fix typo in variable name
branch: default
commit: 2 unknown (clean)
update: (current)
mq:     20 unapplied

and tells me at a glance that I'm at revision 13051, that I'm on the default branch with a clean working copy (though there are 2 untracked files). This is the tip revision in my repository, so an update wont do anything. Finally, I have 20 unapplied MQ patches.