comparison mercurial/wireprotov1peer.py @ 39588:f15a587d2dfc

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
author Augie Fackler <raf@durin42.com>
date Wed, 12 Sep 2018 19:14:28 -0400
parents e7aa113b14f7
children 55e8da487b8a
comparison
equal deleted inserted replaced
39587:918944f53aac 39588:f15a587d2dfc
62 self = args[0] 62 self = args[0]
63 cmd = pycompat.bytesurl(f.__name__) # ensure cmd is ascii bytestr 63 cmd = pycompat.bytesurl(f.__name__) # ensure cmd is ascii bytestr
64 encresref.set(self._submitone(cmd, encargsorres)) 64 encresref.set(self._submitone(cmd, encargsorres))
65 return next(batchable) 65 return next(batchable)
66 setattr(plain, 'batchable', f) 66 setattr(plain, 'batchable', f)
67 setattr(plain, '__name__', f.__name__)
67 return plain 68 return plain
68 69
69 class future(object): 70 class future(object):
70 '''placeholder for a value to be set later''' 71 '''placeholder for a value to be set later'''
71 def set(self, value): 72 def set(self, value):