wireprotov1peer: forward __name__ of wrapped method in batchable decorator
authorAugie Fackler <raf@durin42.com>
Wed, 12 Sep 2018 19:14:28 -0400
changeset 39588 f15a587d2dfc
parent 39587 918944f53aac
child 39589 4eb0f2452ad7
wireprotov1peer: forward __name__ of wrapped method in batchable decorator Not required, but clarifies debugging when the going gets really tough. Differential Revision: https://phab.mercurial-scm.org/D4551
mercurial/wireprotov1peer.py
--- a/mercurial/wireprotov1peer.py	Sun Jul 29 21:28:51 2018 +0900
+++ b/mercurial/wireprotov1peer.py	Wed Sep 12 19:14:28 2018 -0400
@@ -64,6 +64,7 @@
         encresref.set(self._submitone(cmd, encargsorres))
         return next(batchable)
     setattr(plain, 'batchable', f)
+    setattr(plain, '__name__', f.__name__)
     return plain
 
 class future(object):