changeset 30562:b3a9ef3d30e8

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 28 Nov 2016 20:46:59 -0800
parents 7c0c722d568d
children e118233172fe
files mercurial/hgweb/protocol.py mercurial/sshserver.py
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/protocol.py	Wed Nov 16 19:45:35 2016 +0100
+++ b/mercurial/hgweb/protocol.py	Mon Nov 28 20:46:59 2016 -0800
@@ -30,6 +30,8 @@
         self.req = req
         self.response = ''
         self.ui = ui
+        self.name = 'http'
+
     def getargs(self, args):
         knownargs = self._args()
         data = {}
--- a/mercurial/sshserver.py	Wed Nov 16 19:45:35 2016 +0100
+++ b/mercurial/sshserver.py	Mon Nov 28 20:46:59 2016 -0800
@@ -26,6 +26,7 @@
         self.lock = None
         self.fin = ui.fin
         self.fout = ui.fout
+        self.name = 'ssh'
 
         hook.redirect(True)
         ui.fout = repo.ui.fout = ui.ferr