Problem with .hgignore

Bill Freeman bfreeman at appropriatesolutions.com
Fri Apr 9 09:33:28 CDT 2010


In regexp "*" doesn't match the way it does in glob.
In ^target/*$ the /* matches any number (including
zero) of slashes.  The $ makes it so that there can
be nothing else to the end of the path.

What you may have meant was ^target/.*$ because .
matches anything, and .* matches any number of anything.

But your intent can be implemented using just ^target/
because that roughly translates as "a string beginning
with target/ and with no restriction on what follows.

Bill
----- Original Message -----
From: "Ken Egervari" <ken.egervari at gmail.com>
To: mercurial at selenic.com
Sent: Friday, April 9, 2010 1:41:25 AM GMT -05:00 US/Canada Eastern
Subject: Problem with .hgignore


Hi everyone, 

I'm having a problem with .hgignore. I think I'm doing it correctly - I've read the docs and many examples just by googling them. For some reason, mercurial isn't removing my *.iws files from IntelliJ IDEA. I've tried it using both glob and regexp :/ I have tried myproject.iws, *.iws, etc. etc. 

Here's my .hgignore: 


syntax: glob 

myproject_lf5.log 
*.iws 

syntax: regexp 

^target/*$ 

Help? 

Ken 

_______________________________________________
Mercurial mailing list
Mercurial at selenic.com
http://selenic.com/mailman/listinfo/mercurial


More information about the Mercurial mailing list