http://mercurial.selenic.com/wiki/QuickStart
~/.hgrc:
[ui]
username = John Doe <john@example.com>
.hgignore:
syntax: glob
*.orig
*.rej
*~
*.o
tests/*.err
syntax: regexp
.*\#.*\#$
hg clone http://selenic.com/hg mercurial-repo
hg sum
hg status # show all non-ignored files
hg add # add those 'unknown' files
hg commit # commit all changes into a new changeset, edit changelog entry
hg parents # see the currently checked out revision (or changeset)
hg clone project project-work # clone repository
cd project-work
<make changes>
hg commit
cd ../project
<make other changes>
hg commit
hg pull ../project-work # pull changesets from project-work
hg merge # merge the new tip from project-work into our working directory
hg parents # see the revisions that have been merged into the working directory
hg commit # commit the result of the merge
(make changes)
$ hg commit
$ hg export tip # export the most recent commit
$ hg clone http://selenic.com/hg/
$ cd hg
$ hg pull http://selenic.com/hg/
$ hg serve -n "My repo"
$ hg push ssh://user@example.com/hg/