# HG changeset patch # User Gregory Szorc # Date 2016-11-29 04:46:59 # Node ID b3a9ef3d30e82012f1db0babe6ff7cc4e3b76594 # Parent 7c0c722d568dd7120634f8ed7044cabdb9493f43 protocol: declare transport protocol name We add an attribute to the HTTP and SSH protocol implementations identifying the transport so future patches can conditionally expose capabilities on a per-transport basis. diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py +++ b/mercurial/hgweb/protocol.py @@ -30,6 +30,8 @@ class webproto(wireproto.abstractserverp self.req = req self.response = '' self.ui = ui + self.name = 'http' + def getargs(self, args): knownargs = self._args() data = {} diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py --- a/mercurial/sshserver.py +++ b/mercurial/sshserver.py @@ -26,6 +26,7 @@ class sshserver(wireproto.abstractserver self.lock = None self.fin = ui.fin self.fout = ui.fout + self.name = 'ssh' hook.redirect(True) ui.fout = repo.ui.fout = ui.ferr