# HG changeset patch # User Augie Fackler # Date 2020-02-05 22:12:39 # Node ID e76d98546bd2df0cf8be209727d8309ff6821e12 # Parent bbecb6d80aa72ba3f8b4bfb3c853697b2cbb466b merge: use manifestdict.walk() instead of manifestdict.matches() As with other patches in this series, this avoids making a potentially-expensive copy of a manifest. Differential Revision: https://phab.mercurial-scm.org/D8084 diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -997,11 +997,10 @@ def _checkcollision(repo, wmf, actions): """ Check for case-folding collisions. """ - # If the repo is narrowed, filter out files outside the narrowspec. narrowmatch = repo.narrowmatch() if not narrowmatch.always(): - wmf = wmf.matches(narrowmatch) + pmmf = set(wmf.walk(narrowmatch)) if actions: narrowactions = {} for m, actionsfortype in pycompat.iteritems(actions): @@ -1010,9 +1009,9 @@ def _checkcollision(repo, wmf, actions): if narrowmatch(f): narrowactions[m].append((f, args, msg)) actions = narrowactions - - # build provisional merged manifest up - pmmf = set(wmf) + else: + # build provisional merged manifest up + pmmf = set(wmf) if actions: # KEEP and EXEC are no-op