##// END OF EJS Templates
narrow: drop the bundle2 capability since we have server capabilities (BC)...
Pulkit Goyal -
r40786:e3792741 default
parent child Browse files
Show More
@@ -20,7 +20,6 b' from mercurial import ('
20 20 changegroup,
21 21 error,
22 22 exchange,
23 extensions,
24 23 narrowspec,
25 24 repair,
26 25 repository,
@@ -31,10 +30,9 b' from mercurial.utils import ('
31 30 stringutil,
32 31 )
33 32
34 NARROWCAP = 'narrow'
35 33 _NARROWACL_SECTION = 'narrowhgacl'
36 _CHANGESPECPART = NARROWCAP + ':changespec'
37 _SPECPART = NARROWCAP + ':spec'
34 _CHANGESPECPART = 'narrow:changespec'
35 _SPECPART = 'narrow:spec'
38 36 _SPECPART_INCLUDE = 'include'
39 37 _SPECPART_EXCLUDE = 'exclude'
40 38 _KILLNODESIGNAL = 'KILL'
@@ -44,12 +42,6 b" NARROWCAP = 'narrow'"
44 42 _CSHEADERSIZE = struct.calcsize(_ELIDEDCSHEADER)
45 43 _MFHEADERSIZE = struct.calcsize(_ELIDEDMFHEADER)
46 44
47 # When advertising capabilities, always include narrow clone support.
48 def getrepocaps_narrow(orig, repo, **kwargs):
49 caps = orig(repo, **kwargs)
50 caps[NARROWCAP] = ['v0']
51 return caps
52
53 45 # Serve a changegroup for a client with a narrow clone.
54 46 def getbundlechangegrouppart_narrow(bundler, repo, source,
55 47 bundlecaps=None, b2caps=None, heads=None,
@@ -252,8 +244,6 b' def handlechangegroup_widen(op, inpart):'
252 244
253 245 def setup():
254 246 """Enable narrow repo support in bundle2-related extension points."""
255 extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow)
256
257 247 getbundleargs = wireprototypes.GETBUNDLE_ARGUMENTS
258 248
259 249 getbundleargs['narrow'] = 'boolean'
@@ -32,7 +32,6 b' Verify that narrow is advertised in the '
32 32 > EOF
33 33 $ echo hello | hg -R . serve --stdio | \
34 34 > "$PYTHON" unquote.py | tr ' ' '\n' | grep narrow
35 narrow=v0
36 35 exp-narrow-1
37 36
38 37 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now