Mercurial > public > mercurial-scm > hg
diff mercurial/windows.py @ 15655:5402fd9dd13e
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 15 Dec 2011 14:37:36 -0600 |
parents | 25ea33fe7e5c 7f01ad702405 |
children | 7b7f03502b5a |
line wrap: on
line diff
--- a/mercurial/windows.py Thu Dec 15 13:57:54 2011 +0100 +++ b/mercurial/windows.py Thu Dec 15 14:37:36 2011 -0600 @@ -140,7 +140,7 @@ ''' # TODO: There may be a more clever way to do this that also handles other, # less common file systems. - return os.path.normpath(os.path.normcase(os.path.realpath(path))) + return os.path.normpath(normcase(os.path.realpath(path))) def samestat(s1, s2): return False @@ -216,17 +216,16 @@ def statfiles(files): '''Stat each file in files and yield stat or None if file does not exist. Cluster and cache stat per directory to minimize number of OS stat calls.''' - ncase = os.path.normcase dircache = {} # dirname -> filename -> status | None if file does not exist for nf in files: - nf = ncase(nf) + nf = normcase(nf) dir, base = os.path.split(nf) if not dir: dir = '.' cache = dircache.get(dir, None) if cache is None: try: - dmap = dict([(ncase(n), s) + dmap = dict([(normcase(n), s) for n, k, s in osutil.listdir(dir, True)]) except OSError, err: # handle directory not found in Python version prior to 2.5