mercurial/merge.py
changeset 36537 1d99260c3a81
parent 36477 035b77bf01d2
child 37086 658b1d28813c
equal deleted inserted replaced
36536:3cd245945ef3 36537:1d99260c3a81
   285             f = self._repo.vfs(self.statepathv2)
   285             f = self._repo.vfs(self.statepathv2)
   286             data = f.read()
   286             data = f.read()
   287             off = 0
   287             off = 0
   288             end = len(data)
   288             end = len(data)
   289             while off < end:
   289             while off < end:
   290                 rtype = data[off]
   290                 rtype = data[off:off + 1]
   291                 off += 1
   291                 off += 1
   292                 length = _unpack('>I', data[off:(off + 4)])[0]
   292                 length = _unpack('>I', data[off:(off + 4)])[0]
   293                 off += 4
   293                 off += 4
   294                 record = data[off:(off + length)]
   294                 record = data[off:(off + length)]
   295                 off += length
   295                 off += length
   296                 if rtype == 't':
   296                 if rtype == 't':
   297                     rtype, record = record[0], record[1:]
   297                     rtype, record = record[0:1], record[1:]
   298                 records.append((rtype, record))
   298                 records.append((rtype, record))
   299             f.close()
   299             f.close()
   300         except IOError as err:
   300         except IOError as err:
   301             if err.errno != errno.ENOENT:
   301             if err.errno != errno.ENOENT:
   302                 raise
   302                 raise