mercurial/util.py
changeset 15719 1dd60426b061
parent 15718 c604a3d1969d
child 15720 3bcfea777efc
equal deleted inserted replaced
15718:c604a3d1969d 15719:1dd60426b061
   638     for part, sep in pattern.findall(name):
   638     for part, sep in pattern.findall(name):
   639         if sep:
   639         if sep:
   640             result.append(sep)
   640             result.append(sep)
   641             continue
   641             continue
   642 
   642 
   643         contents = _fspathcache.get(dir, None)
   643         if dir not in _fspathcache:
   644         if contents is None:
   644             _fspathcache[dir] = os.listdir(dir)
   645             contents = os.listdir(dir)
   645         contents = _fspathcache[dir]
   646             _fspathcache[dir] = contents
       
   647 
   646 
   648         found = find(part, contents)
   647         found = find(part, contents)
   649         if not found:
   648         if not found:
   650             # retry once for the corner case: add files after dir walking
   649             # retry once for the corner case: add files after dir walking
   651             contents = os.listdir(dir)
   650             contents = os.listdir(dir)