Show More
@@ -140,19 +140,6 b' def wirereposetup(ui, repo):' | |||||
140 | def capabilities(repo, proto): |
|
140 | def capabilities(repo, proto): | |
141 | return capabilitiesorig(repo, proto) + ' largefiles=serve' |
|
141 | return capabilitiesorig(repo, proto) + ' largefiles=serve' | |
142 |
|
142 | |||
143 | # duplicate what Mercurial's new out-of-band errors mechanism does, because |
|
|||
144 | # clients old and new alike both handle it well |
|
|||
145 | def webprotorefuseclient(self, message): |
|
|||
146 | self.req.header([('Content-Type', 'application/hg-error')]) |
|
|||
147 | return message |
|
|||
148 |
|
||||
149 | def sshprotorefuseclient(self, message): |
|
|||
150 | self.ui.write_err('%s\n-\n' % message) |
|
|||
151 | self.fout.write('\n') |
|
|||
152 | self.fout.flush() |
|
|||
153 |
|
||||
154 | return '' |
|
|||
155 |
|
||||
156 | def heads(repo, proto): |
|
143 | def heads(repo, proto): | |
157 | if lfutil.islfilesrepo(repo): |
|
144 | if lfutil.islfilesrepo(repo): | |
158 | return wireproto.ooberror(LARGEFILES_REQUIRED_MSG) |
|
145 | return wireproto.ooberror(LARGEFILES_REQUIRED_MSG) |
@@ -9,9 +9,9 b'' | |||||
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, |
|
12 | httppeer, localrepo, merge, scmutil, sshpeer, wireproto | |
13 | from mercurial.i18n import _ |
|
13 | from mercurial.i18n import _ | |
14 |
from mercurial.hgweb import hgweb_mod, |
|
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 | |
@@ -144,11 +144,6 b' def uisetup(ui):' | |||||
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 |
General Comments 0
You need to be logged in to leave comments.
Login now