Patchwork D1092: peer: when collecting method names for batch calls, bytes-ify __name__

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2017, 1:30 a.m.
Message ID <75c15c51aa0a1443c6c24c056e4dc887@localhost.localdomain>
Download mbox | patch
Permalink /patch/24957/
State Not Applicable
Headers show

Comments

phabricator - Oct. 16, 2017, 1:30 a.m.
durin42 updated this revision to Diff 2790.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1092?vs=2782&id=2790

REVISION DETAIL
  https://phab.mercurial-scm.org/D1092

AFFECTED FILES
  mercurial/peer.py

CHANGE DETAILS




To: durin42, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/mercurial/peer.py b/mercurial/peer.py
--- a/mercurial/peer.py
+++ b/mercurial/peer.py
@@ -34,7 +34,9 @@ 
     def __getattr__(self, name):
         def call(*args, **opts):
             resref = future()
-            self.calls.append((name, args, opts, resref,))
+            # Please don't invent non-ascii method names, or you will
+            # give core hg a very sad time.
+            self.calls.append((name.encode('ascii'), args, opts, resref,))
             return resref
         return call
     def submit(self):