mercurial/util.py
changeset 15720 3bcfea777efc
parent 15719 1dd60426b061
child 16360 e5788269741a
equal deleted inserted replaced
15719:1dd60426b061 15720:3bcfea777efc
   644             _fspathcache[dir] = os.listdir(dir)
   644             _fspathcache[dir] = os.listdir(dir)
   645         contents = _fspathcache[dir]
   645         contents = _fspathcache[dir]
   646 
   646 
   647         found = find(part, contents)
   647         found = find(part, contents)
   648         if not found:
   648         if not found:
   649             # retry once for the corner case: add files after dir walking
   649             # retry "once per directory" per "dirstate.walk" which
       
   650             # may take place for each patches of "hg qpush", for example
   650             contents = os.listdir(dir)
   651             contents = os.listdir(dir)
   651             _fspathcache[dir] = contents
   652             _fspathcache[dir] = contents
   652             found = find(part, contents)
   653             found = find(part, contents)
   653 
   654 
   654         result.append(found or part)
   655         result.append(found or part)