Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 33808:055fee3547df
merge: removed sorting in casefolding detection, for a slight performance win
It was not required for the correctness of the algorithm.
Differential Revision: https://phab.mercurial-scm.org/D30
author | Alex Gaynor <agaynor@mozilla.com> |
---|---|
date | Fri, 14 Jul 2017 19:27:28 +0000 |
parents | 0407a51b9d8c |
children | 65ae54582713 |
comparison
equal
deleted
inserted
replaced
33807:b70029f355a3 | 33808:055fee3547df |
---|---|
751 pmmf.discard(f1) | 751 pmmf.discard(f1) |
752 pmmf.add(f) | 752 pmmf.add(f) |
753 | 753 |
754 # check case-folding collision in provisional merged manifest | 754 # check case-folding collision in provisional merged manifest |
755 foldmap = {} | 755 foldmap = {} |
756 for f in sorted(pmmf): | 756 for f in pmmf: |
757 fold = util.normcase(f) | 757 fold = util.normcase(f) |
758 if fold in foldmap: | 758 if fold in foldmap: |
759 raise error.Abort(_("case-folding collision between %s and %s") | 759 raise error.Abort(_("case-folding collision between %s and %s") |
760 % (f, foldmap[fold])) | 760 % (f, foldmap[fold])) |
761 foldmap[fold] = f | 761 foldmap[fold] = f |