##// END OF EJS Templates
branchmap: check node against changelog instead of repo...
Durham Goode -
r28364:f1460af1 default
parent child Browse files
Show More
@@ -55,6 +55,7 b' def read(repo):'
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
@@ -62,9 +63,9 b' def read(repo):'
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)
General Comments 0
You need to be logged in to leave comments. Login now