Mercurial > hg
changeset 6530:4b92591c69a7
merge: replace readline() call, missing from posixfile_nt
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 12 Apr 2008 20:51:26 +0200 |
parents | 0c611355481b |
children | c2c4fa9af016 |
files | mercurial/merge.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Sat Apr 12 21:34:01 2008 +0200 +++ b/mercurial/merge.py Sat Apr 12 20:51:26 2008 +0200 @@ -21,11 +21,15 @@ def _read(self): self._state = {} try: + localnode = None f = self._repo.opener("merge/state") - self._local = bin(f.readline()[:-1]) - for l in f: - bits = l[:-1].split("\0") - self._state[bits[0]] = bits[1:] + for i, l in enumerate(f): + if i == 0: + localnode = l[:-1] + else: + bits = l[:-1].split("\0") + self._state[bits[0]] = bits[1:] + self._local = bin(localnode) except IOError, err: if err.errno != errno.ENOENT: raise