diff -r 0806fa2a39d8 -r bb04f96df51c mercurial/sshpeer.py --- a/mercurial/sshpeer.py Fri Aug 05 15:35:02 2016 -0400 +++ b/mercurial/sshpeer.py Sat Aug 06 13:46:28 2016 -0700 @@ -232,13 +232,7 @@ __del__ = cleanup def _submitbatch(self, req): - cmds = [] - for op, argsdict in req: - args = ','.join('%s=%s' % (wireproto.escapearg(k), - wireproto.escapearg(v)) - for k, v in argsdict.iteritems()) - cmds.append('%s %s' % (op, args)) - rsp = self._callstream("batch", cmds=';'.join(cmds)) + rsp = self._callstream("batch", cmds=wireproto.encodebatchcmds(req)) available = self._getamount() # TODO this response parsing is probably suboptimal for large # batches with large responses.