Type hg before all the following commands. In some cases, sudo hg is also needed (e.g. if you don’t have user rights to push to a central repo).
revert -all undo changes since last commit
cat -r8 a.txt print old version of a file
diff -r0:1 a.txt changes between two revisions
update -r2 go back to revision 2
clone sourcedir targetdir create a copy of repository
outgoing see which changes are about to be pushed
push submit the changes to the central repo
incoming see which changes are about to be pulled
pull get the latest changes from the central repo
log -P what was pulled
log -l 3 limit log to 3 changes
tag text add a tag. This creates a changeset.
NOTE: last revision is not necessarily equal to the working copy of a file. It is the last commited copy.
NOTE: hginit.com/02.html in the end contains a reasonable work-flow for more than one team member