Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/sshpeer.py @ 33112:05906b8e1d23
py3: use pycompat.byteskwargs() to convert kwargs' keys to bytes
This is used where ever required like where kwargs are passed into
ui.formatter(), scmutil.match() or cmdutil.openrevlog() which expects bytes.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 27 Jun 2017 00:20:55 +0530 |
parents | ad6c5497cd15 |
children | 0407a51b9d8c |
comparison
equal
deleted
inserted
replaced
33111:4a8db3538c39 | 33112:05906b8e1d23 |
---|---|
10 import re | 10 import re |
11 | 11 |
12 from .i18n import _ | 12 from .i18n import _ |
13 from . import ( | 13 from . import ( |
14 error, | 14 error, |
15 pycompat, | |
15 util, | 16 util, |
16 wireproto, | 17 wireproto, |
17 ) | 18 ) |
18 | 19 |
19 class remotelock(object): | 20 class remotelock(object): |
257 available -= toread | 258 available -= toread |
258 work += chunk | 259 work += chunk |
259 yield wireproto.unescapearg(work) | 260 yield wireproto.unescapearg(work) |
260 | 261 |
261 def _callstream(self, cmd, **args): | 262 def _callstream(self, cmd, **args): |
263 args = pycompat.byteskwargs(args) | |
262 self.ui.debug("sending %s command\n" % cmd) | 264 self.ui.debug("sending %s command\n" % cmd) |
263 self.pipeo.write("%s\n" % cmd) | 265 self.pipeo.write("%s\n" % cmd) |
264 _func, names = wireproto.commands[cmd] | 266 _func, names = wireproto.commands[cmd] |
265 keys = names.split() | 267 keys = names.split() |
266 wireargs = {} | 268 wireargs = {} |