Show More
@@ -21,17 +21,8 b' from mercurial import (' | |||
|
21 | 21 | ) |
|
22 | 22 | |
|
23 | 23 | def uisetup(): |
|
24 | extensions.wrapfunction(wireprotov1server, '_capabilities', addnarrowcap) | |
|
25 | 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 | 26 | def reposetup(repo): |
|
36 | 27 | def wirereposetup(ui, peer): |
|
37 | 28 | def wrapped(orig, cmd, *args, **kwargs): |
@@ -286,6 +286,11 b' def _capabilities(repo, proto):' | |||
|
286 | 286 | caps.append('bundle2=' + urlreq.quote(capsblob)) |
|
287 | 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 | 294 | return proto.addcapabilities(repo, caps) |
|
290 | 295 | |
|
291 | 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