# HG changeset patch # User Inada Naoki <songofaca...@gmail.com> # Date 1578992235 -32400 # Tue Jan 14 17:57:15 2020 +0900 # Node ID b8231c6f3cdd3dd56eb0b9aa24b70644ec3d0026 # Parent 8e09551206f54bb102cdcbf4c57b0b10284735ce remotefilelog: fix opening validatecachelog in text mode
diff -r 8e09551206f5 -r b8231c6f3cdd hgext/remotefilelog/basestore.py --- a/hgext/remotefilelog/basestore.py Sat Jan 11 05:44:58 2020 +0100 +++ b/hgext/remotefilelog/basestore.py Tue Jan 14 17:57:15 2020 +0900 @@ -225,7 +225,7 @@ class basestore(object): 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) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel