equal
deleted
inserted
replaced
300 |
300 |
301 def save(self, repo): |
301 def save(self, repo): |
302 """save the data to disk""" |
302 """save the data to disk""" |
303 |
303 |
304 # XXX it happens that the obsstore is (buggilly) always up to date on disk |
304 # XXX it happens that the obsstore is (buggilly) always up to date on disk |
305 if self._cachekey is None: |
305 if self._cachekey is None or self._cachekey == emptykey: |
306 return |
306 return |
307 |
307 |
308 with repo.vfs(self._filepath, 'w', atomictemp=True) as cachefile: |
308 with repo.vfs(self._filepath, 'w', atomictemp=True) as cachefile: |
309 headerdata = struct.pack(self._headerformat, *self._cachekey) |
309 headerdata = struct.pack(self._headerformat, *self._cachekey) |
310 cachefile.write(headerdata) |
310 cachefile.write(headerdata) |