The .hgignore file sits in the WorkingDirectory, next to the .hg folder. It is a file versioned as any other versioned file in the working directory, which is used to hold the content of the ignore patterns that are used for any command operating on the WorkingDirectory.

Man Page: [http://www.selenic.com/mercurial/hgignore.5.html hgignore(5)]