From DJ's site

Braindump: MercurialNotes

Notes on Mercurial

Mercurial is a distributed version control system. It was initiated by Matt Mackall.

Repository Hosting

Settings File

The hgrc file contains various settings. There is stuff that I just can't seem to remember...

My per-user hgrc file usually looks like this (well, with my real contact data of course):

[ui]
ignore = ~/.hgignore
username = John Doe <jdoe@example.org>

[diff]
git = True

[extensions]
hgext.mq =
hgext.convert =

Ignoring files

The hgignore file contains a list of file name patterns that you do not want to be version controlled, e.g. backup files of your editor or compiler output. This file must be located in the project root directory, i.e. /path/to/repo/.hgignore. Additionally, sticking to the .hgrc file above, per-user ignore patterns (used across all projects) could go into $HOME/.hgignore.

The following is a copy & paste template for a new .hgignore file:

syntax: glob

# ignore temporary and/or backup files of various ediors
*~
*.bak
*.swp

# ignore IDE specific stuff (Netbeans)
nbproject

# ignore IDE specific stuff (Eclipse)
.classpath
.project
.settings

Starting from here, add your language and project specific details. E.g. for a C project you might want to ignore object files *.o, while for a Java project you'd want to ignore *.class files instead and for Python you'd rather ignore *.pyc and so on and so forth...

Retrieved from http://djlauk.de/index.php/Braindump/MercurialNotes
Page last modified on July 27, 2010, at 08:26 AM