largefiles: simplify lfutil.getstandinmatcher by inlining getmatcher
authorMads Kiilerich <madski@unity3d.com>
Thu, 13 Dec 2012 19:19:06 +0100
changeset 18146 819c7e10d60d
parent 18145 93206823bd61
child 18147 79f2493198e1
largefiles: simplify lfutil.getstandinmatcher by inlining getmatcher
hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py	Thu Dec 13 19:19:06 2012 +0100
+++ b/hgext/largefiles/lfutil.py	Thu Dec 13 19:19:06 2012 +0100
@@ -260,19 +260,11 @@
         pats = [standindir]
     else:
         # no patterns and no standin dir: return matcher that matches nothing
-        match = match_.match(repo.root, None, [], exact=True)
-        match.matchfn = lambda f: False
-        return match
-    return getmatcher(repo, pats, opts, showbad=False)
+        return match_.match(repo.root, None, [], exact=True)
 
-def getmatcher(repo, pats=[], opts={}, showbad=True):
-    '''Wrapper around scmutil.match() that adds showbad: if false,
-    neuter the match object's bad() method so it does not print any
-    warnings about missing files or directories.'''
+    # no warnings about missing files or directories
     match = scmutil.match(repo[None], pats, opts)
-
-    if not showbad:
-        match.bad = lambda f, msg: None
+    match.bad = lambda f, msg: None
     return match
 
 def composestandinmatcher(repo, rmatcher):