Show More
@@ -191,6 +191,11 b' def encodebatchcmds(req):' | |||||
191 | """Return a ``cmds`` argument value for the ``batch`` command.""" |
|
191 | """Return a ``cmds`` argument value for the ``batch`` command.""" | |
192 | cmds = [] |
|
192 | cmds = [] | |
193 | for op, argsdict in req: |
|
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 | args = ','.join('%s=%s' % (escapearg(k), escapearg(v)) |
|
199 | args = ','.join('%s=%s' % (escapearg(k), escapearg(v)) | |
195 | for k, v in argsdict.iteritems()) |
|
200 | for k, v in argsdict.iteritems()) | |
196 | cmds.append('%s %s' % (op, args)) |
|
201 | cmds.append('%s %s' % (op, args)) | |
@@ -620,7 +625,7 b' def batch(repo, proto, cmds, others):' | |||||
620 | for a in args.split(','): |
|
625 | for a in args.split(','): | |
621 | if a: |
|
626 | if a: | |
622 | n, v = a.split('=') |
|
627 | n, v = a.split('=') | |
623 | vals[n] = unescapearg(v) |
|
628 | vals[unescapearg(n)] = unescapearg(v) | |
624 | func, spec = commands[op] |
|
629 | func, spec = commands[op] | |
625 | if spec: |
|
630 | if spec: | |
626 | keys = spec.split() |
|
631 | keys = spec.split() |
General Comments 0
You need to be logged in to leave comments.
Login now