Mercurial Commands
hg update <branch-name>
to clean all current changes while switching branches
hg update -C|--clean <branch-name>
update to a specific revision
hg update -r|--rev <revision>
current branch name
hg branch
list all branches
hg branches
# show closed branches too
hg branches -c|--closed
hg commit --close-branch
hg branch <branch-name>
hg push -b <branch-name> --new-branch
hg revert --all -r <parent of rev-to-revert>
hg update -r <rev-to-revert>
# this is similar to git checkout <commit-hash>
all logs from all branches
hg log
logs for a specified branch
hg log -b <branch-name>
limit number of logs to be displayed
hg log -b <branch-name> -l <a-number>
hg -R <subrepo> <commands>
current directory with current revision
hg id
# output: f8df3081b002 (BETA) tip
current directory with a specific revision
hg id -r|--rev <revision>
a subrepo directory with current revision
hg -R <subrepo> id
get a complete id that is stored in .hgsubstate
hg --debug id
# output: d5ab68e45277f9134562a780a2d0ccc3e07e15ac (Wanaka_EU_Common)