Comments
Patch
@@ -143,13 +143,12 @@ def bisect(changelog, state):
def load_state(repo):
state = {'current': [], 'good': [], 'bad': [], 'skip': []}
- if os.path.exists(repo.join("bisect.state")):
- for l in repo.vfs("bisect.state"):
- kind, node = l[:-1].split()
- node = repo.lookup(node)
- if kind not in state:
- raise error.Abort(_("unknown bisect kind %s") % kind)
- state[kind].append(node)
+ for l in repo.vfs.tryreadlines("bisect.state"):
+ kind, node = l[:-1].split()
+ node = repo.lookup(node)
+ if kind not in state:
+ raise error.Abort(_("unknown bisect kind %s") % kind)
+ state[kind].append(node)
return state