hgext/largefiles/uisetup.py
changeset 18298 3598c585e464
parent 18144 e16982a74bf7
child 18459 c9db897d5a43
equal deleted inserted replaced
18297:7196f11c5c7d 18298:3598c585e464
     7 # GNU General Public License version 2 or any later version.
     7 # GNU General Public License version 2 or any later version.
     8 
     8 
     9 '''setup for largefiles extension: uisetup'''
     9 '''setup for largefiles extension: uisetup'''
    10 
    10 
    11 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
    11 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
    12     httppeer, localrepo, merge, scmutil, sshpeer, sshserver, wireproto
    12     httppeer, localrepo, merge, scmutil, sshpeer, wireproto
    13 from mercurial.i18n import _
    13 from mercurial.i18n import _
    14 from mercurial.hgweb import hgweb_mod, protocol, webcommands
    14 from mercurial.hgweb import hgweb_mod, webcommands
    15 from mercurial.subrepo import hgsubrepo
    15 from mercurial.subrepo import hgsubrepo
    16 
    16 
    17 import overrides
    17 import overrides
    18 import proto
    18 import proto
    19 
    19 
   142     # the hello wireproto command uses wireproto.capabilities, so it won't see
   142     # the hello wireproto command uses wireproto.capabilities, so it won't see
   143     # our largefiles capability unless we replace the actual function as well.
   143     # our largefiles capability unless we replace the actual function as well.
   144     proto.capabilitiesorig = wireproto.capabilities
   144     proto.capabilitiesorig = wireproto.capabilities
   145     wireproto.capabilities = proto.capabilities
   145     wireproto.capabilities = proto.capabilities
   146 
   146 
   147     # these let us reject non-largefiles clients and make them display
       
   148     # our error messages
       
   149     protocol.webproto.refuseclient = proto.webprotorefuseclient
       
   150     sshserver.sshserver.refuseclient = proto.sshprotorefuseclient
       
   151 
       
   152     # can't do this in reposetup because it needs to have happened before
   147     # can't do this in reposetup because it needs to have happened before
   153     # wirerepo.__init__ is called
   148     # wirerepo.__init__ is called
   154     proto.ssholdcallstream = sshpeer.sshpeer._callstream
   149     proto.ssholdcallstream = sshpeer.sshpeer._callstream
   155     proto.httpoldcallstream = httppeer.httppeer._callstream
   150     proto.httpoldcallstream = httppeer.httppeer._callstream
   156     sshpeer.sshpeer._callstream = proto.sshrepocallstream
   151     sshpeer.sshpeer._callstream = proto.sshrepocallstream