##// END OF EJS Templates
narrow: move the ellipses server capability to core...
Pulkit Goyal -
r39970:a24f4638 default
parent child Browse files
Show More
@@ -32,10 +32,6 b' from mercurial import ('
32 wireprotoserver,
32 wireprotoserver,
33 )
33 )
34
34
35 from . import (
36 narrowwirepeer,
37 )
38
39 table = {}
35 table = {}
40 command = registrar.command(table)
36 command = registrar.command(table)
41
37
@@ -148,7 +144,7 b' def pullbundle2extraprepare(orig, pullop'
148 kwargs['excludepats'] = exclude
144 kwargs['excludepats'] = exclude
149 # calculate known nodes only in ellipses cases because in non-ellipses cases
145 # calculate known nodes only in ellipses cases because in non-ellipses cases
150 # we have all the nodes
146 # we have all the nodes
151 if narrowwirepeer.ELLIPSESCAP in pullop.remote.capabilities():
147 if wireprotoserver.ELLIPSESCAP in pullop.remote.capabilities():
152 kwargs['known'] = [node.hex(ctx.node()) for ctx in
148 kwargs['known'] = [node.hex(ctx.node()) for ctx in
153 repo.set('::%ln', pullop.common)
149 repo.set('::%ln', pullop.common)
154 if ctx.node() != node.nullid]
150 if ctx.node() != node.nullid]
@@ -13,7 +13,6 b' from mercurial import ('
13
13
14 from . import (
14 from . import (
15 narrowdirstate,
15 narrowdirstate,
16 narrowwirepeer,
17 )
16 )
18
17
19 def wraprepo(repo):
18 def wraprepo(repo):
@@ -28,7 +27,7 b' def wraprepo(repo):'
28 def peer(self):
27 def peer(self):
29 peer = super(narrowrepository, self).peer()
28 peer = super(narrowrepository, self).peer()
30 peer._caps.add(wireprotoserver.NARROWCAP)
29 peer._caps.add(wireprotoserver.NARROWCAP)
31 peer._caps.add(narrowwirepeer.ELLIPSESCAP)
30 peer._caps.add(wireprotoserver.ELLIPSESCAP)
32 return peer
31 return peer
33
32
34 repo.__class__ = narrowrepository
33 repo.__class__ = narrowrepository
@@ -14,8 +14,6 b' from mercurial import ('
14 wireprotov1server,
14 wireprotov1server,
15 )
15 )
16
16
17 ELLIPSESCAP = 'exp-ellipses-1'
18
19 def uisetup():
17 def uisetup():
20 extensions.wrapfunction(wireprotov1server, '_capabilities', addnarrowcap)
18 extensions.wrapfunction(wireprotov1server, '_capabilities', addnarrowcap)
21
19
@@ -24,7 +22,7 b' def addnarrowcap(orig, repo, proto):'
24 caps = orig(repo, proto)
22 caps = orig(repo, proto)
25 caps.append(wireprotoserver.NARROWCAP)
23 caps.append(wireprotoserver.NARROWCAP)
26 if repo.ui.configbool('experimental', 'narrowservebrokenellipses'):
24 if repo.ui.configbool('experimental', 'narrowservebrokenellipses'):
27 caps.append(ELLIPSESCAP)
25 caps.append(wireprotoserver.ELLIPSESCAP)
28 return caps
26 return caps
29
27
30 def reposetup(repo):
28 def reposetup(repo):
@@ -39,6 +39,7 b" HGTYPE2 = 'application/mercurial-0.2'"
39 HGERRTYPE = 'application/hg-error'
39 HGERRTYPE = 'application/hg-error'
40
40
41 NARROWCAP = 'exp-narrow-1'
41 NARROWCAP = 'exp-narrow-1'
42 ELLIPSESCAP = 'exp-ellipses-1'
42
43
43 SSHV1 = wireprototypes.SSHV1
44 SSHV1 = wireprototypes.SSHV1
44 SSHV2 = wireprototypes.SSHV2
45 SSHV2 = wireprototypes.SSHV2
General Comments 0
You need to be logged in to leave comments. Login now