# HG changeset patch # User Alexis S. L. Carvalho # Date 1163620617 7200 # Node ID 6f6696962986175a0e60b4efd1c71fa22c64f062 # Parent d5032b951c5ca7a33bca96448a8aa3a9af7f70bf don't use readline() to read branches.cache The posixfile_nt class used on windows doesn't have that method. diff -r d5032b951c5c -r 6f6696962986 mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Nov 13 21:50:09 2006 +0100 +++ b/mercurial/localrepo.py Wed Nov 15 17:56:57 2006 -0200 @@ -324,16 +324,18 @@ partial = {} try: f = self.opener("branches.cache") - last, lrev = f.readline().rstrip().split(" ", 1) + lines = f.read().split('\n') + f.close() + last, lrev = lines.pop(0).rstrip().split(" ", 1) last, lrev = bin(last), int(lrev) if (lrev < self.changelog.count() and self.changelog.node(lrev) == last): # sanity check - for l in f: + for l in lines: + if not l: continue node, label = l.rstrip().split(" ", 1) partial[label] = bin(node) else: # invalidate the cache last, lrev = nullid, nullrev - f.close() except IOError: last, lrev = nullid, nullrev return partial, last, lrev