Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 25274:144085249c3f
commit: 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:36:05 -0700 |
parents | 61b3529e2377 |
children | 8f88f768e24c |
comparison
equal
deleted
inserted
replaced
25273:8e0e334bad42 | 25274:144085249c3f |
---|---|
1442 '.hgsubstate' not in (status.modified + status.added + | 1442 '.hgsubstate' not in (status.modified + status.added + |
1443 status.removed)): | 1443 status.removed)): |
1444 status.removed.insert(0, '.hgsubstate') | 1444 status.removed.insert(0, '.hgsubstate') |
1445 | 1445 |
1446 # make sure all explicit patterns are matched | 1446 # make sure all explicit patterns are matched |
1447 if not force and match.files(): | 1447 if not force and (match.isexact() or match.prefix()): |
1448 matched = set(status.modified + status.added + status.removed) | 1448 matched = set(status.modified + status.added + status.removed) |
1449 | 1449 |
1450 for f in match.files(): | 1450 for f in match.files(): |
1451 f = self.dirstate.normalize(f) | 1451 f = self.dirstate.normalize(f) |
1452 if f == '.' or f in matched or f in wctx.substate: | 1452 if f == '.' or f in matched or f in wctx.substate: |