# Find the status of a repo (any uncomitted changes, revision id, e.t.c)
hg pull http://url.to.repo
# To add/remove any files
# To detect renamed files
hg addrem --similarity 100
# To remove any non-tracked files, but excluding ignored files (require purge extension to be enabled)
# To remove any non-tracked files, including ignore files (requires purge extension to be enabled)
hg commit -m "This is a commmit message."
# Close a branch (make sure to update to branch first)
hg commit --close-branch -m "Closing this branch."
# Clear the working directory (update to the "null" commit)
# This is good for central servers where you won't need a working copy on)
# Compare local repo with default remote repo
##########################
##### BRANCH RELATED #####
##########################
# Create a named branch from the current working directory
hg c -m "Started a new branch."
# Switch working directory to a named branch
# Find out what branch working directory is currently on
##########################
### LOOKING AT CHANGES ###
##########################
# To print out differences in files between the working copy and the last commit
# To print out differences only for a specific folder
# To print out only the filenames of files that have changes
# To print out the last change to a particular file (change the 1 to print out more changes)
# To print out log information for a particular branch only
# You can also use a period to symbolise the current branch
# Copy a repo, but only take a certain amount of history
# This creates a repo which is not linked in any way to the first
# (hash numbers change). Good for making repo smaller.
hg convert --config convert.hg.startrev=123 <source-repository> <new-repository-name>