--- a/mercurial/changelog.py Sun Mar 26 16:16:45 2017 +0900 +++ b/mercurial/changelog.py Sun Mar 26 16:31:01 2017 +0900 @@ -120,7 +120,7 @@ return ret def write(self, s): - self.data.append(str(s)) + self.data.append(bytes(s)) self.offset += len(s) self._end += len(s)