py3: use bytes for wireprotocol command registration
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 09 Jul 2019 10:56:42 -0700
changeset 4716 d587611d0c78
parent 4715 12c8b24757f4
child 4717 7b36f9728351
py3: use bytes for wireprotocol command registration
hgext3rd/evolve/compat.py
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/compat.py	Tue Jul 09 10:56:42 2019 -0700
+++ b/hgext3rd/evolve/compat.py	Tue Jul 09 10:56:42 2019 -0700
@@ -123,7 +123,7 @@
     makedate = mercurial.util.makedate
     parsedate = mercurial.util.parsedate
 
-def wireprotocommand(exthelper, name, args='', permission='pull'):
+def wireprotocommand(exthelper, name, args=b'', permission=b'pull'):
     try:
         # Since b4d85bc1
         from mercurial.wireprotov1server import wireprotocommand
--- a/hgext3rd/evolve/obsdiscovery.py	Tue Jul 09 10:56:42 2019 -0700
+++ b/hgext3rd/evolve/obsdiscovery.py	Tue Jul 09 10:56:42 2019 -0700
@@ -688,7 +688,7 @@
     except ValueError:
         self._abort(error.ResponseError(_("unexpected response:"), d))
 
-@compat.wireprotocommand(eh, 'evoext_obshashrange_v1', 'ranges')
+@compat.wireprotocommand(eh, b'evoext_obshashrange_v1', b'ranges')
 def srv_obshashrange_v1(repo, proto, ranges):
     ranges = decodelist(ranges)
     ranges = [_decrange(r) for r in ranges]