# HG changeset patch # User Pierre-Yves David # Date 1493734623 -7200 # Node ID 0d2e0e8e76f6554e788effaf544635d60431692d # Parent b33bc2f37e8915505631f256d1fae527093eb71b obscache: set a valid "empty" cache key if the cache is missing This avoid detecting bad cache when it just happens to be no cache. diff -r b33bc2f37e89 -r 0d2e0e8e76f6 hgext3rd/evolve/obscache.py --- a/hgext3rd/evolve/obscache.py Tue May 02 16:10:14 2017 +0200 +++ b/hgext3rd/evolve/obscache.py Tue May 02 16:17:03 2017 +0200 @@ -82,6 +82,8 @@ return obsstore +emptykey = (node.nullrev, node.nullid, 0, 0, node.nullid) + def getcachekey(repo): """get a cache key covering the changesets and obsmarkers content @@ -314,6 +316,7 @@ data = repo.vfs.tryread(self._filepath) if not data: + self._cachekey = emptykey return headersize = struct.calcsize(self._headerformat)