Show More
@@ -98,7 +98,7 b' class dirstate(object):' | |||
|
98 | 98 | if self._checkcase: |
|
99 | 99 | self.normalize = self._normalize |
|
100 | 100 | else: |
|
101 | self.normalize = lambda x: x | |
|
101 | self.normalize = lambda x, y=False: x | |
|
102 | 102 | return self.normalize |
|
103 | 103 | else: |
|
104 | 104 | raise AttributeError(name) |
@@ -350,13 +350,16 b' class dirstate(object):' | |||
|
350 | 350 | except KeyError: |
|
351 | 351 | self._ui.warn(_("not in dirstate: %s\n") % f) |
|
352 | 352 | |
|
353 | def _normalize(self, path): | |
|
353 | def _normalize(self, path, knownpath=False): | |
|
354 | 354 | norm_path = os.path.normcase(os.path.normpath(path)) |
|
355 |
|
|
|
356 | if not os.path.exists(os.path.join(self._root, path)): | |
|
357 | return path | |
|
358 | self._foldmap[norm_path] = util.fspath(path, self._root) | |
|
359 | return self._foldmap[norm_path] | |
|
355 | fold_path = self._foldmap.get(norm_path, None) | |
|
356 | if fold_path is None: | |
|
357 | if knownpath or not os.path.exists(os.path.join(self._root, path)): | |
|
358 | fold_path = path | |
|
359 | else: | |
|
360 | fold_path = self._foldmap.setdefault(norm_path, | |
|
361 | util.fspath(path, self._root)) | |
|
362 | return fold_path | |
|
360 | 363 | |
|
361 | 364 | def clear(self): |
|
362 | 365 | self._map = {} |
@@ -515,7 +518,7 b' class dirstate(object):' | |||
|
515 | 518 | else: |
|
516 | 519 | entries = listdir(join(nd), stat=True, skip ='.hg') |
|
517 | 520 | for f, kind, st in entries: |
|
518 | nf = normalize(nd and (nd + "/" + f) or f) | |
|
521 | nf = normalize(nd and (nd + "/" + f) or f, True) | |
|
519 | 522 | if nf not in results: |
|
520 | 523 | if kind == dirkind: |
|
521 | 524 | if not ignore(nf): |
General Comments 0
You need to be logged in to leave comments.
Login now