# HG changeset patch # User Martin von Zweigbergk # Date 2015-05-19 17:40:40 # Node ID d94e403b523731d07809e8676f76ff110b5522e2 # Parent 144085249c3f55ca5abf071f6d253e35589ee713 dirstate: use match.prefix() instead of 'not match.anypats()' It seems clearer to check for what it is than what it isn't. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -985,7 +985,7 @@ class dirstate(object): # fast path -- filter the other way around, since typically files is # much smaller than dmap return [f for f in files if f in dmap] - if not match.anypats() and all(fn in dmap for fn in files): + if match.prefix() and all(fn in dmap for fn in files): # fast path -- all the values are known to be files, so just return # that return list(files)