[PATCH 2 of 4] icasefs: follow standard cache look up pattern
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Fri Dec 23 16:03:01 UTC 2011
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1324655474 -32400
# Node ID 1dd60426b0611d23db184a8210b56ccbb6c3ea9d
# Parent c604a3d1969d174f7564bb045d62863995b7dabc
icasefs: follow standard cache look up pattern
diff -r c604a3d1969d -r 1dd60426b061 mercurial/util.py
--- a/mercurial/util.py Sat Dec 24 00:50:56 2011 +0900
+++ b/mercurial/util.py Sat Dec 24 00:51:14 2011 +0900
@@ -640,10 +640,9 @@
result.append(sep)
continue
- contents = _fspathcache.get(dir, None)
- if contents is None:
- contents = os.listdir(dir)
- _fspathcache[dir] = contents
+ if dir not in _fspathcache:
+ _fspathcache[dir] = os.listdir(dir)
+ contents = _fspathcache[dir]
found = find(part, contents)
if not found:
More information about the Mercurial-devel
mailing list