largefiles: remove unused proto.refuseclient code
authorMads Kiilerich <madski@unity3d.com>
Fri, 11 Jan 2013 16:30:29 +0100
changeset 18298 3598c585e464
parent 18297 7196f11c5c7d
child 18299 a7a88a458a4c
largefiles: remove unused proto.refuseclient code Should have been removed with other pre-1.9 code in 7c604d8c7e83.
hgext/largefiles/proto.py
hgext/largefiles/uisetup.py
--- a/hgext/largefiles/proto.py	Thu Jan 03 17:42:25 2013 +0100
+++ b/hgext/largefiles/proto.py	Fri Jan 11 16:30:29 2013 +0100
@@ -140,19 +140,6 @@
 def capabilities(repo, proto):
     return capabilitiesorig(repo, proto) + ' largefiles=serve'
 
-# duplicate what Mercurial's new out-of-band errors mechanism does, because
-# clients old and new alike both handle it well
-def webprotorefuseclient(self, message):
-    self.req.header([('Content-Type', 'application/hg-error')])
-    return message
-
-def sshprotorefuseclient(self, message):
-    self.ui.write_err('%s\n-\n' % message)
-    self.fout.write('\n')
-    self.fout.flush()
-
-    return ''
-
 def heads(repo, proto):
     if lfutil.islfilesrepo(repo):
         return wireproto.ooberror(LARGEFILES_REQUIRED_MSG)
--- a/hgext/largefiles/uisetup.py	Thu Jan 03 17:42:25 2013 +0100
+++ b/hgext/largefiles/uisetup.py	Fri Jan 11 16:30:29 2013 +0100
@@ -9,9 +9,9 @@
 '''setup for largefiles extension: uisetup'''
 
 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
-    httppeer, localrepo, merge, scmutil, sshpeer, sshserver, wireproto
+    httppeer, localrepo, merge, scmutil, sshpeer, wireproto
 from mercurial.i18n import _
-from mercurial.hgweb import hgweb_mod, protocol, webcommands
+from mercurial.hgweb import hgweb_mod, webcommands
 from mercurial.subrepo import hgsubrepo
 
 import overrides
@@ -144,11 +144,6 @@
     proto.capabilitiesorig = wireproto.capabilities
     wireproto.capabilities = proto.capabilities
 
-    # these let us reject non-largefiles clients and make them display
-    # our error messages
-    protocol.webproto.refuseclient = proto.webprotorefuseclient
-    sshserver.sshserver.refuseclient = proto.sshprotorefuseclient
-
     # can't do this in reposetup because it needs to have happened before
     # wirerepo.__init__ is called
     proto.ssholdcallstream = sshpeer.sshpeer._callstream