##// END OF EJS Templates
dirstate: fold paths using the just added util.realpath() function....
Dan Villiom Podlaski Christiansen -
r9239:26fa0e31 default
parent child Browse files
Show More
@@ -0,0 +1,4 b''
1 #!/bin/sh
2
3 hg clone --quiet $TESTDIR/test-path-normalization.hg t
4 exec hg st -R t
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -59,7 +59,7 b' class dirstate(object):'
59 def _foldmap(self):
59 def _foldmap(self):
60 f = {}
60 f = {}
61 for name in self._map:
61 for name in self._map:
62 f[os.path.normcase(name)] = name
62 f[util.realpath(self._join(name))] = name
63 return f
63 return f
64
64
65 @propertycache
65 @propertycache
@@ -340,7 +340,7 b' class dirstate(object):'
340 self._ui.warn(_("not in dirstate: %s\n") % f)
340 self._ui.warn(_("not in dirstate: %s\n") % f)
341
341
342 def _normalize(self, path, knownpath):
342 def _normalize(self, path, knownpath):
343 norm_path = os.path.normcase(path)
343 norm_path = util.realpath(self._join(path))
344 fold_path = self._foldmap.get(norm_path, None)
344 fold_path = self._foldmap.get(norm_path, None)
345 if fold_path is None:
345 if fold_path is None:
346 if knownpath or not os.path.exists(os.path.join(self._root, path)):
346 if knownpath or not os.path.exists(os.path.join(self._root, path)):
General Comments 0
You need to be logged in to leave comments. Login now