comparison mercurial/merge.py @ 38045:18e6ea9ba81d

narrow: filter set of files to check for case-folding to core Differential Revision: https://phab.mercurial-scm.org/D3575
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 17 May 2018 15:25:52 -0700
parents 8f37b5fc5abf
children bec1212eceaa
comparison
equal deleted inserted replaced
38044:8f37b5fc5abf 38045:18e6ea9ba81d
901 actions[f] = ACTION_FORGET, None, "forget removed" 901 actions[f] = ACTION_FORGET, None, "forget removed"
902 902
903 return actions 903 return actions
904 904
905 def _checkcollision(repo, wmf, actions): 905 def _checkcollision(repo, wmf, actions):
906 """
907 Check for case-folding collisions.
908 """
909
910 # If the repo is narrowed, filter out files outside the narrowspec.
911 narrowmatch = repo.narrowmatch()
912 if not narrowmatch.always():
913 wmf = wmf.matches(narrowmatch)
914 if actions:
915 narrowactions = {}
916 for m, actionsfortype in actions.iteritems():
917 narrowactions[m] = []
918 for (f, args, msg) in actionsfortype:
919 if narrowmatch(f):
920 narrowactions[m].append((f, args, msg))
921 actions = narrowactions
922
906 # build provisional merged manifest up 923 # build provisional merged manifest up
907 pmmf = set(wmf) 924 pmmf = set(wmf)
908 925
909 if actions: 926 if actions:
910 # KEEP and EXEC are no-op 927 # KEEP and EXEC are no-op