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