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