##// END OF EJS Templates
py3: make sure we write in mergestate in bytes mode...
Pulkit Goyal -
r36495:035b77bf default
parent child Browse files
Show More
@@ -399,7 +399,7 b' class mergestate(object):'
399
399
400 def _writerecordsv1(self, records):
400 def _writerecordsv1(self, records):
401 """Write current state on disk in a version 1 file"""
401 """Write current state on disk in a version 1 file"""
402 f = self._repo.vfs(self.statepathv1, 'w')
402 f = self._repo.vfs(self.statepathv1, 'wb')
403 irecords = iter(records)
403 irecords = iter(records)
404 lrecords = next(irecords)
404 lrecords = next(irecords)
405 assert lrecords[0] == 'L'
405 assert lrecords[0] == 'L'
@@ -415,7 +415,7 b' class mergestate(object):'
415 See the docstring for _readrecordsv2 for why we use 't'."""
415 See the docstring for _readrecordsv2 for why we use 't'."""
416 # these are the records that all version 2 clients can read
416 # these are the records that all version 2 clients can read
417 whitelist = 'LOF'
417 whitelist = 'LOF'
418 f = self._repo.vfs(self.statepathv2, 'w')
418 f = self._repo.vfs(self.statepathv2, 'wb')
419 for key, data in records:
419 for key, data in records:
420 assert len(key) == 1
420 assert len(key) == 1
421 if key not in whitelist:
421 if key not in whitelist:
General Comments 0
You need to be logged in to leave comments. Login now