D1092: peer: when collecting method names for batch calls, bytes-ify __name__
durin42 updated this revision to Diff 2790. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1092?vs=2782=2790 REVISION DETAIL https://phab.mercurial-scm.org/D1092 AFFECTED FILES mercurial/peer.py CHANGE DETAILS 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): To: durin42, #hg-reviewers, yuja Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D1092: peer: when collecting method names for batch calls, bytes-ify __name__
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa652b7763f66: peer: when collecting method names for batch calls, bytes-ify __name__ (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1092?vs=2772=2782 REVISION DETAIL https://phab.mercurial-scm.org/D1092 AFFECTED FILES mercurial/peer.py CHANGE DETAILS 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): To: durin42, #hg-reviewers, yuja Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D1092: peer: when collecting method names for batch calls, bytes-ify __name__
durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will explode violently if we have a non-ascii command name. That shouldn't ever happen in core, and seems unlikely even in third-party code. Regardless, it'll explode violently, so we can revisit things in the future if we need to change the encoding here. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1092 AFFECTED FILES mercurial/peer.py CHANGE DETAILS 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): To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel