53 partial = branchcache(tipnode=last, tiprev=lrev, |
53 partial = branchcache(tipnode=last, tiprev=lrev, |
54 filteredhash=filteredhash) |
54 filteredhash=filteredhash) |
55 if not partial.validfor(repo): |
55 if not partial.validfor(repo): |
56 # invalidate the cache |
56 # invalidate the cache |
57 raise ValueError('tip differs') |
57 raise ValueError('tip differs') |
|
58 cl = repo.changelog |
58 for l in lines: |
59 for l in lines: |
59 if not l: |
60 if not l: |
60 continue |
61 continue |
61 node, state, label = l.split(" ", 2) |
62 node, state, label = l.split(" ", 2) |
62 if state not in 'oc': |
63 if state not in 'oc': |
63 raise ValueError('invalid branch state') |
64 raise ValueError('invalid branch state') |
64 label = encoding.tolocal(label.strip()) |
65 label = encoding.tolocal(label.strip()) |
65 if not node in repo: |
|
66 raise ValueError('node %s does not exist' % node) |
|
67 node = bin(node) |
66 node = bin(node) |
|
67 if not cl.hasnode(node): |
|
68 raise ValueError('node %s does not exist' % hex(node)) |
68 partial.setdefault(label, []).append(node) |
69 partial.setdefault(label, []).append(node) |
69 if state == 'c': |
70 if state == 'c': |
70 partial._closednodes.add(node) |
71 partial._closednodes.add(node) |
71 except KeyboardInterrupt: |
72 except KeyboardInterrupt: |
72 raise |
73 raise |