Show reason why an ignore file can't be read and state that it is skipped.
authorThomas Arendsen Hein <thomas@intevation.de>
Sat, 25 Mar 2006 10:31:06 +0100
changeset 2006 ff8b39daa930
parent 2005 bc47af2d3693
child 2007 2ffa36dc3423
Show reason why an ignore file can't be read and state that it is skipped.
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Sat Mar 25 10:12:23 2006 +0100
+++ b/mercurial/dirstate.py	Sat Mar 25 10:31:06 2006 +0100
@@ -86,9 +86,10 @@
                             pat = line
                             break
                     pats[f].append(pat)
-            except IOError:
+            except IOError, inst:
                 if f != repoignore:
-                    self.ui.warn(_("ignore file %s not found\n") % f)
+                    self.ui.warn(_("skipping unreadable ignore file"
+                                   " '%s': %s\n") % (f, inst.strerror))
         return pats
 
     def ignore(self, fn):