Mercurial > hg-stable
changeset 44101:25097b4d2c6f
remotefilelog: fix opening validatecachelog in text mode
author | Inada Naoki <songofacandy@gmail.com> |
---|---|
date | Tue, 14 Jan 2020 17:57:15 +0900 |
parents | 969527ac7b44 |
children | fdaa4233dc18 |
files | hgext/remotefilelog/basestore.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/remotefilelog/basestore.py Thu Jan 16 12:27:15 2020 -0800 +++ b/hgext/remotefilelog/basestore.py Tue Jan 14 17:57:15 2020 +0900 @@ -225,7 +225,7 @@ data = shallowutil.readfile(filepath) if self._validatecache and not self._validatedata(data, filepath): if self._validatecachelog: - with open(self._validatecachelog, b'a+') as f: + with open(self._validatecachelog, b'ab+') as f: f.write(b"corrupt %s during read\n" % filepath) os.rename(filepath, filepath + b".corrupt") raise KeyError(b"corrupt local cache file %s" % filepath)