##// END OF EJS Templates
branchmap: make error messages consistent between Python 2 and 3...
Augie Fackler -
r35849:a011e414 default
parent child Browse files
Show More
@@ -18,6 +18,7 b' from .node import ('
18 18 from . import (
19 19 encoding,
20 20 error,
21 pycompat,
21 22 scmutil,
22 23 util,
23 24 )
@@ -52,18 +53,19 b' def read(repo):'
52 53 filteredhash=filteredhash)
53 54 if not partial.validfor(repo):
54 55 # invalidate the cache
55 raise ValueError('tip differs')
56 raise ValueError(r'tip differs')
56 57 cl = repo.changelog
57 58 for l in lines:
58 59 if not l:
59 60 continue
60 61 node, state, label = l.split(" ", 2)
61 62 if state not in 'oc':
62 raise ValueError('invalid branch state')
63 raise ValueError(r'invalid branch state')
63 64 label = encoding.tolocal(label.strip())
64 65 node = bin(node)
65 66 if not cl.hasnode(node):
66 raise ValueError('node %s does not exist' % hex(node))
67 raise ValueError(
68 r'node %s does not exist' % pycompat.sysstr(hex(node)))
67 69 partial.setdefault(label, []).append(node)
68 70 if state == 'c':
69 71 partial._closednodes.add(node)
@@ -73,7 +75,7 b' def read(repo):'
73 75 if repo.filtername is not None:
74 76 msg += ' (%s)' % repo.filtername
75 77 msg += ': %s\n'
76 repo.ui.debug(msg % inst)
78 repo.ui.debug(msg % pycompat.bytestr(inst))
77 79 partial = None
78 80 return partial
79 81
General Comments 0
You need to be logged in to leave comments. Login now