Show More
@@ -65,6 +65,10 b' class dirstate(object):' | |||
|
65 | 65 | return self._copymap |
|
66 | 66 | |
|
67 | 67 | @propertycache |
|
68 | def _normroot(self): | |
|
69 | return util.normcase(self._root) | |
|
70 | ||
|
71 | @propertycache | |
|
68 | 72 | def _foldmap(self): |
|
69 | 73 | f = {} |
|
70 | 74 | for name in self._map: |
@@ -384,7 +388,7 b' class dirstate(object):' | |||
|
384 | 388 | folded = path |
|
385 | 389 | else: |
|
386 | 390 | folded = self._foldmap.setdefault(normed, |
|
387 |
util.fspath( |
|
|
391 | util.fspath(normed, self._normroot)) | |
|
388 | 392 | return folded |
|
389 | 393 | |
|
390 | 394 | def normalize(self, path, isknown=False): |
@@ -616,10 +616,10 b' def fspath(name, root):' | |||
|
616 | 616 | The name is either relative to root, or it is an absolute path starting |
|
617 | 617 | with root. Note that this function is unnecessary, and should not be |
|
618 | 618 | called, for case-sensitive filesystems (simply because it's expensive). |
|
619 | ||
|
620 | Both name and root should be normcase-ed. | |
|
619 | 621 | ''' |
|
620 | 622 | # If name is absolute, make it relative |
|
621 | name = normcase(name) | |
|
622 | root = normcase(root) | |
|
623 | 623 | if name.startswith(root): |
|
624 | 624 | l = len(root) |
|
625 | 625 | if name[l] == os.sep or name[l] == os.altsep: |
General Comments 0
You need to be logged in to leave comments.
Login now