perftweaks: fix case collision check

This commit is contained in:
Durham Goode 2015-10-07 12:29:56 -07:00
parent 0272f0d7ec
commit c093153d86
2 changed files with 18 additions and 1 deletions

View File

@ -26,6 +26,6 @@ def _readtagcache(orig, ui, repo):
def _checkcollision(orig, repo, wmf, actions):
"""Disables case collision checking since it is known to be very slow."""
if ui.configbool('perftweaks', 'disablecasecheck'):
if repo.ui.configbool('perftweaks', 'disablecasecheck'):
return
orig(repo, wmf, actions)

View File

@ -32,3 +32,20 @@ Test disabling the tag cache
$ hg blackbox | grep tag
*> tags (glob)
*> tags --config perftweaks.disabletags=True exited 0 after * seconds (glob)
$ cd ..
Test disabling the case conflict check (only fails on case sensitive systems)
$ hg init casecheck
$ cd casecheck
$ cat >> .hg/hgrc <<EOF
> [perftweaks]
> disablecasecheck=True
> EOF
$ touch a
$ hg add a
$ hg commit -m a
$ touch A
$ hg add A
warning: possible case-folding collision for A
$ hg commit -m A