changeset 25273:8e0e334bad42

_makelogrevset: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 19 May 2015 11:35:43 -0700
parents 6c76c42a5893
children 144085249c3f
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue May 19 11:34:50 2015 -0700
+++ b/mercurial/cmdutil.py	Tue May 19 11:35:43 2015 -0700
@@ -1951,7 +1951,8 @@
     # platforms without shell expansion (windows).
     wctx = repo[None]
     match, pats = scmutil.matchandpats(wctx, pats, opts)
-    slowpath = match.anypats() or (match.files() and opts.get('removed'))
+    slowpath = match.anypats() or ((match.isexact() or match.prefix()) and
+                                   opts.get('removed'))
     if not slowpath:
         for f in match.files():
             if follow and f not in wctx: