# HG changeset patch # User Gregory Szorc # Date 1517426261 28800 # Node ID d7cce6df65bb2e016ef5ff63d0d506ddc0c67028 # Parent d747cf39cf7001b6deb814927518ce3f394445dc wireprotoserver: remove support for do_ handlers (API) Old versions of wire protocol handlers relied on methods named do_ to handle wire protocol commands. The last definition of these methods on sshserver was removed by 9f6e0e7ef828 ~2 years ago. I think it's time to not support this mechanism for defining command handlers. .. api:: sshserver no longers looks for wire protocol command handlers in methods named do_. Use @wireproto.wireprotocommand to declare wire protocol command handler functions. Differential Revision: https://phab.mercurial-scm.org/D1985 diff -r d747cf39cf70 -r d7cce6df65bb mercurial/wireprotoserver.py --- a/mercurial/wireprotoserver.py Wed Jan 31 10:19:08 2018 -0800 +++ b/mercurial/wireprotoserver.py Wed Jan 31 11:17:41 2018 -0800 @@ -344,13 +344,7 @@ rsp = wireproto.dispatch(self.repo, self, cmd) self.handlers[rsp.__class__](self, rsp) elif cmd: - impl = getattr(self, 'do_' + cmd, None) - if impl: - r = impl() - if r is not None: - self.sendresponse(r) - else: - self.sendresponse("") + self.sendresponse("") return cmd != '' def _client(self):