diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -59,7 +59,7 @@ class dirstate(object): def _foldmap(self): f = {} for name in self._map: - f[os.path.normcase(name)] = name + f[util.realpath(self._join(name))] = name return f @propertycache @@ -340,7 +340,7 @@ class dirstate(object): self._ui.warn(_("not in dirstate: %s\n") % f) def _normalize(self, path, knownpath): - norm_path = os.path.normcase(path) + norm_path = util.realpath(self._join(path)) fold_path = self._foldmap.get(norm_path, None) if fold_path is None: if knownpath or not os.path.exists(os.path.join(self._root, path)): diff --git a/tests/test-path-normalization b/tests/test-path-normalization new file mode 100755 --- /dev/null +++ b/tests/test-path-normalization @@ -0,0 +1,4 @@ +#!/bin/sh + +hg clone --quiet $TESTDIR/test-path-normalization.hg t +exec hg st -R t diff --git a/tests/test-path-normalization.hg b/tests/test-path-normalization.hg new file mode 100644 index 0000000000000000000000000000000000000000..73ea086c424d1d011310533a43f74582f1835ff5 GIT binary patch literal 404 zc$@*00c-w9M=>x$T4*^jL0KkKStkp}5&!@R|Nq~TKxj-4f938JM*u(X-2nmwAP|az z0s;&$10huyG9fSl8pgpYk?AI$L@-87ni^muCL`4J0s|%l+5^=wri4-IYGX{1noLQi znWl!ON2!PgOcCl~44PyOG%$$N2*?4D0B8UJ05kv^001FOxrvJ)oInhWL;!$1gcJZN zHZl@eeuSoK!cnRk*OImct{HOm*$28g5RV}0Q)qZk!TafYGR#&(9PZYW4Opx#oDjRt zXR7Q0(0w=z^+uQ?2z9ZtxtUbzFjEt-rUu77!kqwjg{AlpOJ