compat: drop the context manager used to write the cache file
Mercurial 3.8 does not supports context manager on atomic temporary file.
--- a/hgext3rd/evolve/obscache.py Wed May 03 12:54:11 2017 +0200
+++ b/hgext3rd/evolve/obscache.py Wed May 03 13:27:26 2017 +0200
@@ -307,10 +307,11 @@
if self._cachekey is None or self._cachekey == self._ondiskkey:
return
- with repo.vfs(self._filepath, 'w', atomictemp=True) as cachefile:
- headerdata = struct.pack(self._headerformat, *self._cachekey)
- cachefile.write(headerdata)
- cachefile.write(self._data)
+ cachefile = repo.vfs(self._filepath, 'w', atomictemp=True)
+ headerdata = struct.pack(self._headerformat, *self._cachekey)
+ cachefile.write(headerdata)
+ cachefile.write(self._data)
+ cachefile.close()
def load(self, repo):
"""load data from disk"""