Show More
@@ -32,7 +32,6 b' from mercurial.utils import (' | |||
|
32 | 32 | ) |
|
33 | 33 | |
|
34 | 34 | NARROWCAP = 'narrow' |
|
35 | ELLIPSESCAP = 'ellipses' | |
|
36 | 35 | _NARROWACL_SECTION = 'narrowhgacl' |
|
37 | 36 | _CHANGESPECPART = NARROWCAP + ':changespec' |
|
38 | 37 | _SPECPART = NARROWCAP + ':spec' |
@@ -32,7 +32,7 b' from mercurial import (' | |||
|
32 | 32 | ) |
|
33 | 33 | |
|
34 | 34 | from . import ( |
|
35 |
narrow |
|
|
35 | narrowwirepeer, | |
|
36 | 36 | ) |
|
37 | 37 | |
|
38 | 38 | table = {} |
@@ -171,7 +171,7 b' def pullbundle2extraprepare(orig, pullop' | |||
|
171 | 171 | if repository.NARROW_REQUIREMENT not in repo.requirements: |
|
172 | 172 | return orig(pullop, kwargs) |
|
173 | 173 | |
|
174 |
if narrow |
|
|
174 | if narrowwirepeer.NARROWCAP not in pullop.remote.capabilities(): | |
|
175 | 175 | raise error.Abort(_("server doesn't support narrow clones")) |
|
176 | 176 | orig(pullop, kwargs) |
|
177 | 177 | kwargs['narrow'] = True |
@@ -182,7 +182,7 b' def pullbundle2extraprepare(orig, pullop' | |||
|
182 | 182 | kwargs['excludepats'] = exclude |
|
183 | 183 | # calculate known nodes only in ellipses cases because in non-ellipses cases |
|
184 | 184 | # we have all the nodes |
|
185 |
if narrow |
|
|
185 | if narrowwirepeer.ELLIPSESCAP in pullop.remote.capabilities(): | |
|
186 | 186 | kwargs['known'] = [node.hex(ctx.node()) for ctx in |
|
187 | 187 | repo.set('::%ln', pullop.common) |
|
188 | 188 | if ctx.node() != node.nullid] |
@@ -8,9 +8,9 b'' | |||
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | 10 | from . import ( |
|
11 | narrowbundle2, | |
|
12 | 11 | narrowdirstate, |
|
13 | 12 | narrowrevlog, |
|
13 | narrowwirepeer, | |
|
14 | 14 | ) |
|
15 | 15 | |
|
16 | 16 | def wraprepo(repo): |
@@ -29,8 +29,8 b' def wraprepo(repo):' | |||
|
29 | 29 | |
|
30 | 30 | def peer(self): |
|
31 | 31 | peer = super(narrowrepository, self).peer() |
|
32 |
peer._caps.add(narrow |
|
|
33 |
peer._caps.add(narrow |
|
|
32 | peer._caps.add(narrowwirepeer.NARROWCAP) | |
|
33 | peer._caps.add(narrowwirepeer.ELLIPSESCAP) | |
|
34 | 34 | return peer |
|
35 | 35 | |
|
36 | 36 | repo.__class__ = narrowrepository |
@@ -17,7 +17,8 b' from mercurial import (' | |||
|
17 | 17 | wireprotov1server, |
|
18 | 18 | ) |
|
19 | 19 | |
|
20 | from . import narrowbundle2 | |
|
20 | NARROWCAP = 'narrow' | |
|
21 | ELLIPSESCAP = 'ellipses' | |
|
21 | 22 | |
|
22 | 23 | def uisetup(): |
|
23 | 24 | def peersetup(ui, peer): |
@@ -46,9 +47,9 b' def uisetup():' | |||
|
46 | 47 | def addnarrowcap(orig, repo, proto): |
|
47 | 48 | """add the narrow capability to the server""" |
|
48 | 49 | caps = orig(repo, proto) |
|
49 |
caps.append( |
|
|
50 | caps.append(NARROWCAP) | |
|
50 | 51 | if repo.ui.configbool('experimental', 'narrowservebrokenellipses'): |
|
51 |
caps.append( |
|
|
52 | caps.append(ELLIPSESCAP) | |
|
52 | 53 | return caps |
|
53 | 54 | |
|
54 | 55 | def reposetup(repo): |
General Comments 0
You need to be logged in to leave comments.
Login now