Show More
@@ -114,12 +114,6 b' class dirstate(object):' | |||||
114 | def _checkcase(self): |
|
114 | def _checkcase(self): | |
115 | return not util.checkcase(self._join('.hg')) |
|
115 | return not util.checkcase(self._join('.hg')) | |
116 |
|
116 | |||
117 | @propertycache |
|
|||
118 | def normalize(self): |
|
|||
119 | if self._checkcase: |
|
|||
120 | return self._normalize |
|
|||
121 | return lambda x, y=False: x |
|
|||
122 |
|
||||
123 | def _join(self, f): |
|
117 | def _join(self, f): | |
124 | # much faster than os.path.join() |
|
118 | # much faster than os.path.join() | |
125 | # it's safe because f is always a relative path |
|
119 | # it's safe because f is always a relative path | |
@@ -345,7 +339,7 b' class dirstate(object):' | |||||
345 | except KeyError: |
|
339 | except KeyError: | |
346 | self._ui.warn(_("not in dirstate: %s\n") % f) |
|
340 | self._ui.warn(_("not in dirstate: %s\n") % f) | |
347 |
|
341 | |||
348 |
def _normalize(self, path, knownpath |
|
342 | def _normalize(self, path, knownpath): | |
349 | norm_path = os.path.normcase(path) |
|
343 | norm_path = os.path.normcase(path) | |
350 | fold_path = self._foldmap.get(norm_path, None) |
|
344 | fold_path = self._foldmap.get(norm_path, None) | |
351 | if fold_path is None: |
|
345 | if fold_path is None: | |
@@ -450,7 +444,6 b' class dirstate(object):' | |||||
450 | badfn = match.bad |
|
444 | badfn = match.bad | |
451 | dmap = self._map |
|
445 | dmap = self._map | |
452 | normpath = util.normpath |
|
446 | normpath = util.normpath | |
453 | normalize = self.normalize |
|
|||
454 | listdir = osutil.listdir |
|
447 | listdir = osutil.listdir | |
455 | lstat = os.lstat |
|
448 | lstat = os.lstat | |
456 | getkind = stat.S_IFMT |
|
449 | getkind = stat.S_IFMT | |
@@ -461,6 +454,11 b' class dirstate(object):' | |||||
461 | work = [] |
|
454 | work = [] | |
462 | wadd = work.append |
|
455 | wadd = work.append | |
463 |
|
456 | |||
|
457 | if self._checkcase: | |||
|
458 | normalize = self._normalize | |||
|
459 | else: | |||
|
460 | normalize = lambda x, y: x | |||
|
461 | ||||
464 | exact = skipstep3 = False |
|
462 | exact = skipstep3 = False | |
465 | if matchfn == match.exact: # match.exact |
|
463 | if matchfn == match.exact: # match.exact | |
466 | exact = True |
|
464 | exact = True | |
@@ -475,7 +473,7 b' class dirstate(object):' | |||||
475 |
|
473 | |||
476 | # step 1: find all explicit files |
|
474 | # step 1: find all explicit files | |
477 | for ff in sorted(files): |
|
475 | for ff in sorted(files): | |
478 | nf = normalize(normpath(ff)) |
|
476 | nf = normalize(normpath(ff), True) | |
479 | if nf in results: |
|
477 | if nf in results: | |
480 | continue |
|
478 | continue | |
481 |
|
479 |
General Comments 0
You need to be logged in to leave comments.
Login now