changeset 21116:30c60e28aa9b

dirstate: report bad subdirectories as match.bad, not just a warning (BC) This seems simpler and more correct. The only test coverage for this is test-permissions.t when it says: dir: Permission denied
author Mads Kiilerich <madski@unity3d.com>
date Thu, 03 Oct 2013 18:01:21 +0200
parents 1b6e37f44250
children 91eb605022f5
files mercurial/dirstate.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Thu Oct 03 18:01:21 2013 +0200
+++ b/mercurial/dirstate.py	Thu Oct 03 18:01:21 2013 +0200
@@ -637,10 +637,6 @@
         # implementation doesn't use it at all. This satisfies the contract
         # because we only guarantee a "maybe".
 
-        def fwarn(f, msg):
-            self._ui.warn('%s: %s\n' % (self.pathto(f), msg))
-            return False
-
         if ignored:
             ignore = util.never
             dirignore = util.never
@@ -695,7 +691,7 @@
                 entries = listdir(join(nd), stat=True, skip=skip)
             except OSError, inst:
                 if inst.errno in (errno.EACCES, errno.ENOENT):
-                    fwarn(nd, inst.strerror)
+                    match.bad(self.pathto(nd), inst.strerror)
                     continue
                 raise
             for f, kind, st in entries: