Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireprotov1server.py @ 40076:ad8d8dc9be3f
narrow: move adding of narrow server capabilities to core
We use the experimental.narrow config option introduced in one of the previous
patch and move the functionality of adding narrow server capabilities to core.
Differential Revision: https://phab.mercurial-scm.org/D4891
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Fri, 05 Oct 2018 22:52:24 +0300 |
parents | 7e4a856a4f05 |
children | 876494fd967d |
line wrap: on
line diff
--- a/mercurial/wireprotov1server.py Fri Oct 05 22:31:12 2018 +0300 +++ b/mercurial/wireprotov1server.py Fri Oct 05 22:52:24 2018 +0300 @@ -286,6 +286,11 @@ caps.append('bundle2=' + urlreq.quote(capsblob)) caps.append('unbundle=%s' % ','.join(bundle2.bundlepriority)) + if repo.ui.configbool('experimental', 'narrow'): + caps.append(wireprototypes.NARROWCAP) + if repo.ui.configbool('experimental', 'narrowservebrokenellipses'): + caps.append(wireprototypes.ELLIPSESCAP) + return proto.addcapabilities(repo, caps) # If you are writing an extension and consider wrapping this function. Wrap