Mercurial > public > mercurial-scm > hg-stable
diff mercurial/peer.py @ 34733:115efdd97088
peer: ensure command names are always ascii bytestrs
Differential Revision: https://phab.mercurial-scm.org/D1104
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 15 Oct 2017 00:05:00 -0400 |
parents | a652b7763f66 |
children |
line wrap: on
line diff
--- a/mercurial/peer.py Sun Oct 15 00:03:31 2017 -0400 +++ b/mercurial/peer.py Sun Oct 15 00:05:00 2017 -0400 @@ -10,6 +10,7 @@ from . import ( error, + pycompat, util, ) @@ -92,7 +93,8 @@ if not encresref: return encargsorres # a local result in this case self = args[0] - encresref.set(self._submitone(f.__name__, encargsorres)) + cmd = pycompat.bytesurl(f.__name__) # ensure cmd is ascii bytestr + encresref.set(self._submitone(cmd, encargsorres)) return next(batchable) setattr(plain, 'batchable', f) return plain