views:

77

answers:

1

I am trying to get mercurial to ignore hidden files for a specific user. I used the directions here:

http://stackoverflow.com/questions/2395179/how-to-make-mercurial-ignore-all-hidden-files

and got it to ignore files in a specific repo. I want to extend this behavior to all hg repos for a specific user.

The hgrc man page says you can link a user specific ignore file (e.g., ~/.hgignore) by including something like this in your ~/.hgrc:

[ui]
username = Some User <[email protected]>
ignore = ~/.hgignore

but that doesn't seem to be working.

I have also tried

ignore = /home/someuser/.hgignore
ignore = $HOME/.hgignore
ignore = ~/.hgignore2

But that doesn't seem to be working either. Am I missing something? I can't find anything on the selenic site or anywhere else. Please help, thanks.

**EDIT - I am on Linux. hg showconfig indicates that hg is reading my .hgrc file correctly, the ignore behavior outlined therein is not working though.

**EDIT2 - I also tried restarting my machine, just to see if that would update things. It did not.

A: 

You don't need to specify ~/.hgignore. It is automatically applied after system hgignore and before repo hgignore.

I use many ignore files in ~/.hgrc without problem with hg 1.5 on linux.

[ui]
ignore = /home/geoffz/bin/hgext/hgignore
ignore.local = /home/geoffz/bin/hgext/hgignore.local
ignore.java = /home/geoffz/bin/hgext/hgignore.java

Create a trivial repo with a few files you want to ignore, setup your ignore entries, and do hg st -A. If those files are shown as ? and not I, then you have a serious problem in your hg/linux setup.

Geoffrey Zheng