Mercurial > hg
comparison hgext/remotefilelog/fileserverclient.py @ 40610:13d4ad8d7801
py3: fix keyword arguments handling in hgext/remotefilelog/
Keys of kwargs on Python 3 should be strings. This patch fixes them by appending
r'' prefixes, and using pycompat.byteskwargs() and pycompat.strkwargs().
Differential Revision: https://phab.mercurial-scm.org/D5259
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 13 Nov 2018 17:41:26 +0300 |
parents | 466dd4d70bff |
children | 3fa4183e7803 |
comparison
equal
deleted
inserted
replaced
40609:ee9981bc8b44 | 40610:13d4ad8d7801 |
---|---|
16 | 16 |
17 from mercurial.i18n import _ | 17 from mercurial.i18n import _ |
18 from mercurial.node import bin, hex, nullid | 18 from mercurial.node import bin, hex, nullid |
19 from mercurial import ( | 19 from mercurial import ( |
20 error, | 20 error, |
21 pycompat, | |
21 revlog, | 22 revlog, |
22 sshpeer, | 23 sshpeer, |
23 util, | 24 util, |
24 wireprotov1peer, | 25 wireprotov1peer, |
25 ) | 26 ) |
117 **opts) | 118 **opts) |
118 | 119 |
119 def _callstream(self, command, **opts): | 120 def _callstream(self, command, **opts): |
120 supertype = super(remotefilepeer, self) | 121 supertype = super(remotefilepeer, self) |
121 if not util.safehasattr(supertype, '_sendrequest'): | 122 if not util.safehasattr(supertype, '_sendrequest'): |
122 self._updatecallstreamopts(command, opts) | 123 self._updatecallstreamopts(command, pycompat.byteskwargs(opts)) |
123 return super(remotefilepeer, self)._callstream(command, **opts) | 124 return super(remotefilepeer, self)._callstream(command, **opts) |
124 | 125 |
125 peer.__class__ = remotefilepeer | 126 peer.__class__ = remotefilepeer |
126 | 127 |
127 class cacheconnection(object): | 128 class cacheconnection(object): |