icasefs: use case preserved root for 'util.fspath()' invocation (
issue3302)
path to repo root may contains case sensitive part, even though repo
is located in case insensitive filesystem: e.g. repo in FAT32 device
mounted on Unix.
so, case normalized root causes failure of stat(2).
this patch uses case preserved root for 'util.fspath()' invocation to
avoid this problem.
case preserved root for 'util.fspath()' may decrease efficiency of
fspath cache, but 'util.fspath()' is currently called only from
dirstate, so this fix has less impact.
--- a/mercurial/dirstate.py Wed Mar 14 14:45:41 2012 -0500
+++ b/mercurial/dirstate.py Thu Mar 15 00:46:37 2012 +0900
@@ -78,10 +78,6 @@
return self._copymap
@propertycache
- def _normroot(self):
- return util.normcase(self._root)
-
- @propertycache
def _foldmap(self):
f = {}
for name in self._map:
@@ -406,7 +402,7 @@
folded = path
else:
folded = self._foldmap.setdefault(normed,
- util.fspath(normed, self._normroot))
+ util.fspath(normed, self._root))
return folded
def normalize(self, path, isknown=False):