obscache: load the disk data before checking is the cache is up to date
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Tue, 02 May 2017 16:09:03 +0200
changeset 2301 54b2fddbc2f5
parent 2300 01efebff13ec
child 2302 acd2431dff29
obscache: load the disk data before checking is the cache is up to date This is actually required since non-loaded cache will never be up to date...
hgext3rd/evolve/obscache.py
--- a/hgext3rd/evolve/obscache.py	Tue May 02 02:13:33 2017 +0200
+++ b/hgext3rd/evolve/obscache.py	Tue May 02 16:09:03 2017 +0200
@@ -212,6 +212,8 @@
         self._data = bytearray()
 
     def uptodate(self, repo):
+        if self._cachekey is None:
+            self.load(repo)
         valid, startrev, startidx = upgradeneeded(repo, self._cachekey)
         return (valid and startrev is None and startidx is None)