The hgignore file can be used to help Mercurial in deciding which files to ignore. If you find yourself repeating the same file patterns in the hgignore files of your Mercurial repositories, then you might want to create a global hgignore file.
First, create a
.hgignore file in your home directory. Fill it up with patterns just like you did for your repository’s hgignore.
Next, add this entry to your global Mercurial configuration file:
[ui] ignore = ~/.hgignore
Tried with: Mercurial 2.0.2 and Ubuntu 12.04 LTS