0

I'd like to hg add excluding files that begin with ._, or even better exclude all hidden files.

It's not working, it's just completely ignoring my -X option.

I tried the following:

hg add -n -X '._*'
hg add -n -X '*._*'

and just to be sure also:

hg add -n -X '*.*'

nothing. It's just as if I didn't -X at all.

I've tried both with hg 1.4.3 and hg 1.0.1

o0'.
  • 2,327

1 Answers1

2

(This works on Windows and Mercurial 1.5.3; things may be different for Unix if that's what you're using).

You have the file spec. in single quotes; it should be double quotes:

hg add -X "._*"

Another way would be to add an entry to your .hgignore file, for example:

 syntax: glob
 ._*
Niall C.
  • 150
  • 1
  • 1
  • 9
  • I'll have a look at .hgignore because it seems it should do it, thanks :) (btw: I'm using OSX) – o0'. May 29 '10 at 16:07