From patchwork Thu May 21 21:32:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4,of,7] commit: avoid match.files() in conditions From: Martin von Zweigbergk X-Patchwork-Id: 9224 Message-Id: To: mercurial-devel@selenic.com Date: Thu, 21 May 2015 16:32:31 -0500 # HG changeset patch # User Martin von Zweigbergk # Date 1432060565 25200 # Tue May 19 11:36:05 2015 -0700 # Node ID d2aad10416bb2b08587f7d55cbe9e1f934b3de9e # Parent 3fec5bc8607568164efcc27607fe249092b3fefc commit: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1443,7 +1443,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():