Add warning if user-configured hgignore file isn't found
authormcmillen@cs.cmu.edu
Sat, 25 Mar 2006 10:02:39 +0100
changeset 2004 7dd6317ab4fd
parent 2003 62647394e368
child 2005 bc47af2d3693
Add warning if user-configured hgignore file isn't found
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Fri Mar 24 20:18:02 2006 +0100
+++ b/mercurial/dirstate.py	Sat Mar 25 10:02:39 2006 +0100
@@ -62,7 +62,8 @@
                     elif line[i] == '#': break
                 line = line[:i].rstrip()
                 if line: yield line
-        files = [self.wjoin('.hgignore')]
+        repoignore = self.wjoin('.hgignore')
+        files = [repoignore]
         files.extend(self.ui.hgignorefiles())
         pats = []
         for f in files:
@@ -84,7 +85,9 @@
                             pat = line
                             break
                     pats.append(pat)
-            except IOError: pass
+            except IOError:
+                if f != repoignore:
+                    self.ui.warn(_("ignore file %s not found\n") % f)
         return pats
 
     def ignore(self, fn):