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