##// END OF EJS Templates
wireproto: unescape argument names in batch command (BC)...
Gregory Szorc -
r29734:62e2e048 default
parent child Browse files
Show More
@@ -191,6 +191,11 b' def encodebatchcmds(req):'
191 191 """Return a ``cmds`` argument value for the ``batch`` command."""
192 192 cmds = []
193 193 for op, argsdict in req:
194 # Old servers didn't properly unescape argument names. So prevent
195 # the sending of argument names that may not be decoded properly by
196 # servers.
197 assert all(escapearg(k) == k for k in argsdict)
198
194 199 args = ','.join('%s=%s' % (escapearg(k), escapearg(v))
195 200 for k, v in argsdict.iteritems())
196 201 cmds.append('%s %s' % (op, args))
@@ -620,7 +625,7 b' def batch(repo, proto, cmds, others):'
620 625 for a in args.split(','):
621 626 if a:
622 627 n, v = a.split('=')
623 vals[n] = unescapearg(v)
628 vals[unescapearg(n)] = unescapearg(v)
624 629 func, spec = commands[op]
625 630 if spec:
626 631 keys = spec.split()
General Comments 0
You need to be logged in to leave comments. Login now