Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

cachethg: return consistent state

Changeset 78c0676525ef

Parent 496ef4cf6121

by Simon Heimberg

Changes to one file · Browse files at 78c0676525ef Showing diff from parent 496ef4cf6121 Diff from another changeset...

 
59
60
61
62
 
 
 
63
64
65
 
67
68
69
70
 
71
72
73
 
59
60
61
 
62
63
64
65
66
67
 
69
70
71
 
72
73
74
75
@@ -59,7 +59,9 @@
  pdir = os.path.dirname(path)   if cache_pdir == pdir and overlay_cache:   if tc - cache_tick_count < CACHE_TIMEOUT: - status = overlay_cache.get(path, NOT_IN_REPO) + status = overlay_cache.get(path) + if not status: + status = overlay_cache.get(pdir, NOT_IN_REPO)   print "%s: %s (cached)" % (path, status)   return status   else: @@ -67,7 +69,7 @@
  overlay_cache.clear()   # path is a drive   if path.endswith(":\\"): - overlay_cache[path] = UNKNOWN + overlay_cache[path] = NOT_IN_REPO   return NOT_IN_REPO   # open repo   if cache_pdir == pdir: