changeset 8680:b6511055d37b

match: ignore return of match.bad All users returned false, return can now be dropped
author Matt Mackall <mpm@selenic.com>
date Sun, 31 May 2009 17:54:18 -0500
parents 32537b12e091
children 26f133267cd7
files mercurial/cmdutil.py mercurial/dirstate.py mercurial/localrepo.py mercurial/match.py
diffstat 4 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Sun May 31 17:54:18 2009 -0500
+++ b/mercurial/cmdutil.py	Sun May 31 17:54:18 2009 -0500
@@ -256,7 +256,6 @@
                     opts.get('include'), opts.get('exclude'), default)
     def badfn(f, msg):
         repo.ui.warn("%s: %s\n" % (m.rel(f), msg))
-        return False
     m.bad = badfn
     return m
 
--- a/mercurial/dirstate.py	Sun May 31 17:54:18 2009 -0500
+++ b/mercurial/dirstate.py	Sun May 31 17:54:18 2009 -0500
@@ -515,8 +515,7 @@
                             dostep3 = True
                             break
                     else:
-                        if badfn(ff, inst.strerror) and not ignore(nf):
-                            results[nf] = None
+                        badfn(ff, inst.strerror)
 
         # step 2: visit subdirectories
         while work:
--- a/mercurial/localrepo.py	Sun May 31 17:54:18 2009 -0500
+++ b/mercurial/localrepo.py	Sun May 31 17:54:18 2009 -0500
@@ -948,7 +948,6 @@
             def bad(f, msg):
                 if f not in ctx1:
                     self.ui.warn('%s: %s\n' % (self.dirstate.pathto(f), msg))
-                return False
             match.bad = bad
 
         if working: # we need to scan the working dir
--- a/mercurial/match.py	Sun May 31 17:54:18 2009 -0500
+++ b/mercurial/match.py	Sun May 31 17:54:18 2009 -0500
@@ -83,12 +83,8 @@
     def bad(self, f, msg):
         '''callback for each explicit file that can't be
         found/accessed, with an error message
-
-        return True to keep file in results, False to discard
-
-        default behavior is to silently keep
         '''
-        return True
+        pass
     def dir(self, f):
         pass
     def missing(self, f):