Show More
@@ -21,17 +21,8 b' from mercurial import (' | |||||
21 | ) |
|
21 | ) | |
22 |
|
22 | |||
23 | def uisetup(): |
|
23 | def uisetup(): | |
24 | extensions.wrapfunction(wireprotov1server, '_capabilities', addnarrowcap) |
|
|||
25 | wireprotov1peer.wirepeer.narrow_widen = peernarrowwiden |
|
24 | wireprotov1peer.wirepeer.narrow_widen = peernarrowwiden | |
26 |
|
25 | |||
27 | def addnarrowcap(orig, repo, proto): |
|
|||
28 | """add the narrow capability to the server""" |
|
|||
29 | caps = orig(repo, proto) |
|
|||
30 | caps.append(wireprototypes.NARROWCAP) |
|
|||
31 | if repo.ui.configbool('experimental', 'narrowservebrokenellipses'): |
|
|||
32 | caps.append(wireprototypes.ELLIPSESCAP) |
|
|||
33 | return caps |
|
|||
34 |
|
||||
35 | def reposetup(repo): |
|
26 | def reposetup(repo): | |
36 | def wirereposetup(ui, peer): |
|
27 | def wirereposetup(ui, peer): | |
37 | def wrapped(orig, cmd, *args, **kwargs): |
|
28 | def wrapped(orig, cmd, *args, **kwargs): |
@@ -286,6 +286,11 b' def _capabilities(repo, proto):' | |||||
286 | caps.append('bundle2=' + urlreq.quote(capsblob)) |
|
286 | caps.append('bundle2=' + urlreq.quote(capsblob)) | |
287 | caps.append('unbundle=%s' % ','.join(bundle2.bundlepriority)) |
|
287 | caps.append('unbundle=%s' % ','.join(bundle2.bundlepriority)) | |
288 |
|
288 | |||
|
289 | if repo.ui.configbool('experimental', 'narrow'): | |||
|
290 | caps.append(wireprototypes.NARROWCAP) | |||
|
291 | if repo.ui.configbool('experimental', 'narrowservebrokenellipses'): | |||
|
292 | caps.append(wireprototypes.ELLIPSESCAP) | |||
|
293 | ||||
289 | return proto.addcapabilities(repo, caps) |
|
294 | return proto.addcapabilities(repo, caps) | |
290 |
|
295 | |||
291 | # If you are writing an extension and consider wrapping this function. Wrap |
|
296 | # If you are writing an extension and consider wrapping this function. Wrap |
General Comments 0
You need to be logged in to leave comments.
Login now