changeset 2308:ef8beb602b41

obscache: skip writing if the cache is empty if the cache is empty, we can just skip writing to disk.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 02 May 2017 16:19:05 +0200
parents 0d2e0e8e76f6
children 9f09cabe679e
files hgext3rd/evolve/obscache.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obscache.py	Tue May 02 16:17:03 2017 +0200
+++ b/hgext3rd/evolve/obscache.py	Tue May 02 16:19:05 2017 +0200
@@ -302,7 +302,7 @@
         """save the data to disk"""
 
         # XXX it happens that the obsstore is (buggilly) always up to date on disk
-        if self._cachekey is None:
+        if self._cachekey is None or self._cachekey == emptykey:
             return
 
         with repo.vfs(self._filepath, 'w', atomictemp=True) as cachefile: