##// END OF EJS Templates
hbisect: use tryreadlines to load state...
Bryan O'Sullivan -
r27525:cba62f99 default
parent child Browse files
Show More
@@ -11,7 +11,6 b''
11 11 from __future__ import absolute_import
12 12
13 13 import collections
14 import os
15 14
16 15 from .i18n import _
17 16 from .node import (
@@ -143,13 +142,12 b' def bisect(changelog, state):'
143 142
144 143 def load_state(repo):
145 144 state = {'current': [], 'good': [], 'bad': [], 'skip': []}
146 if os.path.exists(repo.join("bisect.state")):
147 for l in repo.vfs("bisect.state"):
148 kind, node = l[:-1].split()
149 node = repo.lookup(node)
150 if kind not in state:
151 raise error.Abort(_("unknown bisect kind %s") % kind)
152 state[kind].append(node)
145 for l in repo.vfs.tryreadlines("bisect.state"):
146 kind, node = l[:-1].split()
147 node = repo.lookup(node)
148 if kind not in state:
149 raise error.Abort(_("unknown bisect kind %s") % kind)
150 state[kind].append(node)
153 151 return state
154 152
155 153
General Comments 0
You need to be logged in to leave comments. Login now