--- a/hgext/narrow/narrowbundle2.py Sun Jul 02 04:06:24 2017 +0200
+++ b/hgext/narrow/narrowbundle2.py Fri Oct 05 23:10:56 2018 +0300
@@ -20,7 +20,6 @@
changegroup,
error,
exchange,
- extensions,
narrowspec,
repair,
repository,
@@ -31,10 +30,9 @@
stringutil,
)
-NARROWCAP = 'narrow'
_NARROWACL_SECTION = 'narrowhgacl'
-_CHANGESPECPART = NARROWCAP + ':changespec'
-_SPECPART = NARROWCAP + ':spec'
+_CHANGESPECPART = 'narrow:changespec'
+_SPECPART = 'narrow:spec'
_SPECPART_INCLUDE = 'include'
_SPECPART_EXCLUDE = 'exclude'
_KILLNODESIGNAL = 'KILL'
@@ -44,12 +42,6 @@
_CSHEADERSIZE = struct.calcsize(_ELIDEDCSHEADER)
_MFHEADERSIZE = struct.calcsize(_ELIDEDMFHEADER)
-# When advertising capabilities, always include narrow clone support.
-def getrepocaps_narrow(orig, repo, **kwargs):
- caps = orig(repo, **kwargs)
- caps[NARROWCAP] = ['v0']
- return caps
-
# Serve a changegroup for a client with a narrow clone.
def getbundlechangegrouppart_narrow(bundler, repo, source,
bundlecaps=None, b2caps=None, heads=None,
@@ -252,8 +244,6 @@
def setup():
"""Enable narrow repo support in bundle2-related extension points."""
- extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow)
-
getbundleargs = wireprototypes.GETBUNDLE_ARGUMENTS
getbundleargs['narrow'] = 'boolean'