##// END OF EJS Templates
largefiles: wrap heads command handler more directly...
Gregory Szorc -
r37502:c22fd3c4 default
parent child Browse files
Show More
@@ -168,12 +168,13 b' def _capabilities(orig, repo, proto):'
168 168 caps.append('largefiles=serve')
169 169 return caps
170 170
171 def heads(repo, proto):
171 def heads(orig, repo, proto):
172 172 '''Wrap server command - largefile capable clients will know to call
173 173 lheads instead'''
174 174 if lfutil.islfilesrepo(repo):
175 175 return wireprototypes.ooberror(LARGEFILES_REQUIRED_MSG)
176 return wireproto.heads(repo, proto)
176
177 return orig(repo, proto)
177 178
178 179 def sshrepocallstream(self, cmd, **args):
179 180 if cmd == 'heads' and self.capable('largefiles'):
@@ -174,7 +174,7 b' def uisetup(ui):'
174 174 wireproto.heads)
175 175
176 176 # ... and wrap some existing ones
177 wireproto.commands['heads'].func = proto.heads
177 extensions.wrapfunction(wireproto.commands['heads'], 'func', proto.heads)
178 178 # TODO also wrap wireproto.commandsv2 once heads is implemented there.
179 179
180 180 extensions.wrapfunction(webcommands, 'decodepath', overrides.decodepath)
General Comments 0
You need to be logged in to leave comments. Login now