commit: avoid match.files() in conditions
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 19 May 2015 11:36:05 -0700
changeset 25274 144085249c3f
parent 25273 8e0e334bad42
child 25275 d94e403b5237
commit: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue May 19 11:35:43 2015 -0700
+++ b/mercurial/localrepo.py	Tue May 19 11:36:05 2015 -0700
@@ -1444,7 +1444,7 @@
                     status.removed.insert(0, '.hgsubstate')
 
             # make sure all explicit patterns are matched
-            if not force and match.files():
+            if not force and (match.isexact() or match.prefix()):
                 matched = set(status.modified + status.added + status.removed)
 
                 for f in match.files():