comparison mercurial/cmdutil.py @ 17201:afd75476939e

scmutil: 25% speedup in casecollisionauditor On a large repository, switching casecollisionauditor to lowercasing all file names at once rather than one at a time improves hg-add time by 25%.
author Joshua Redstone <joshua.redstone@fb.com>
date Fri, 06 Jul 2012 13:56:40 -0700
parents cdf1532d89c6
children 62c56c94c77e
comparison
equal deleted inserted replaced
17200:19f5dec2d61f 17201:afd75476939e
1471 names = [] 1471 names = []
1472 wctx = repo[None] 1472 wctx = repo[None]
1473 cca = None 1473 cca = None
1474 abort, warn = scmutil.checkportabilityalert(ui) 1474 abort, warn = scmutil.checkportabilityalert(ui)
1475 if abort or warn: 1475 if abort or warn:
1476 cca = scmutil.casecollisionauditor(ui, abort, wctx) 1476 cca = scmutil.casecollisionauditor(ui, abort, repo.dirstate)
1477 for f in repo.walk(match): 1477 for f in repo.walk(match):
1478 exact = match.exact(f) 1478 exact = match.exact(f)
1479 if exact or not explicitonly and f not in repo.dirstate: 1479 if exact or not explicitonly and f not in repo.dirstate:
1480 if cca: 1480 if cca:
1481 cca(f) 1481 cca(f)