D30: merge: Removed sorting in casefolding detection, for a slight performance win

quark (Jun Wu) phabricator at mercurial-scm.org
Wed Aug 9 21:34:20 UTC 2017


quark added a comment.


  @durin42 The case-folding collision might be a small feature that Rust is meaningful.

INLINE COMMENTS

> merge.py:765
>      foldprefix = unfoldprefix = lastfull = ''
> -    for fold, f in sorted(foldmap.items()):
> +    for fold, f in foldmap.items():
>          if fold.startswith(foldprefix) and not f.startswith(unfoldprefix):

I think this would be incorrect, since `foldprefix` is mutated and used in the loop.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D30

To: alex_gaynor, durin42, dsp
Cc: quark, krbullock, dsp, mercurial-devel


More information about the Mercurial-devel mailing list