# HG changeset patch # User Martin von Zweigbergk # Date 2014-10-31 05:32:39 # Node ID 55325a327754b92e068256c11d88f5057877d1a7 # Parent cd0c51c07e5f777ba86fa5c79ee53c72240c5abf largefiles: drop unnecessary setting of matcher._always In two very similar segments of code, an existing matcher is modified by changing its _files attribute through a map and a filter operation. Neither operation can cause an empty list to become non-empty, so a matcher that always matches can not stop always matching. Drop the setting of the attribute, so we don't unnecessarily prevent the fast paths to be taken where these matchers end up being used. diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -576,7 +576,6 @@ def overridecopy(orig, ui, repo, pats, o lfile = lambda f: lfutil.standin(f) in manifest m._files = [lfutil.standin(f) for f in m._files if lfile(f)] m._fmap = set(m._files) - m._always = False origmatchfn = m.matchfn m.matchfn = lambda f: (lfutil.isstandin(f) and (f in manifest) and @@ -684,7 +683,6 @@ def overriderevert(orig, ui, repo, *pats m._files = [tostandin(f) for f in m._files] m._files = [f for f in m._files if f is not None] m._fmap = set(m._files) - m._always = False origmatchfn = m.matchfn def matchfn(f): if lfutil.isstandin(f):