mercurial/merge.py
changeset 6530 4b92591c69a7
parent 6518 92ccccb55ba3
child 6740 b148e9099133
equal deleted inserted replaced
6529:0c611355481b 6530:4b92591c69a7
    19         self._local = node
    19         self._local = node
    20         shutil.rmtree(self._repo.join("merge"), True)
    20         shutil.rmtree(self._repo.join("merge"), True)
    21     def _read(self):
    21     def _read(self):
    22         self._state = {}
    22         self._state = {}
    23         try:
    23         try:
       
    24             localnode = None
    24             f = self._repo.opener("merge/state")
    25             f = self._repo.opener("merge/state")
    25             self._local = bin(f.readline()[:-1])
    26             for i, l in enumerate(f):
    26             for l in f:
    27                 if i == 0:
    27                 bits = l[:-1].split("\0")
    28                     localnode = l[:-1]
    28                 self._state[bits[0]] = bits[1:]
    29                 else:
       
    30                     bits = l[:-1].split("\0")
       
    31                     self._state[bits[0]] = bits[1:]
       
    32             self._local = bin(localnode)
    29         except IOError, err:
    33         except IOError, err:
    30             if err.errno != errno.ENOENT:
    34             if err.errno != errno.ENOENT:
    31                 raise
    35                 raise
    32     def _write(self):
    36     def _write(self):
    33         f = self._repo.opener("merge/state", "w")
    37         f = self._repo.opener("merge/state", "w")