Skip to content
Snippets Groups Projects
Commit d56ceb82 authored by Matt Mackall's avatar Matt Mackall
Browse files

dirstate: improve case-folding logic

- return normalized form in directory walk
- track normalized form in known
parent f8299c84
No related branches found
No related tags found
No related merge requests found
......@@ -560,5 +560,6 @@
continue
for f, kind, st in entries:
np = pconvert(join(nd, f))
nn = self.normalize(np)
if np in known:
continue
......@@ -563,6 +564,6 @@
if np in known:
continue
known[np] = 1
known[nn] = 1
p = join(top, f)
# don't trip over symlinks
if kind == stat.S_IFDIR:
......@@ -571,6 +572,6 @@
if hasattr(match, 'dir'):
match.dir(np)
if np in dc and match(np):
add((np, 'm', st))
add((nn, 'm', st))
elif imatch(np):
if supported(np, st.st_mode):
......@@ -575,4 +576,4 @@
elif imatch(np):
if supported(np, st.st_mode):
add((np, 'f', st))
add((nn, 'f', st))
elif np in dc:
......@@ -578,5 +579,5 @@
elif np in dc:
add((np, 'm', st))
add((nn, 'm', st))
found.sort()
return found
......@@ -584,6 +585,7 @@
files.sort()
for ff in files:
nf = normpath(ff)
nn = self.normalize(nf)
f = _join(ff)
try:
st = lstat(f)
......@@ -604,5 +606,5 @@
for f, src, st in findfiles(f):
yield src, f, st
else:
if nf in known:
if nn in known:
continue
......@@ -608,5 +610,5 @@
continue
known[nf] = 1
known[nn] = 1
if match(nf):
if supported(ff, st.st_mode, verbose=True):
yield 'f', self.normalize(nf), st
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment