##// END OF EJS Templates
localpeer: return only visible heads and branchmap...
Pierre-Yves David -
r17204:4feb55e6 default
parent child Browse files
Show More
@@ -168,9 +168,6 def checkheads(repo, remote, outgoing, r
168 branches = set(repo[n].branch() for n in outgoing.missing)
168 branches = set(repo[n].branch() for n in outgoing.missing)
169
169
170 # 2. Check for new branches on the remote.
170 # 2. Check for new branches on the remote.
171 if remote.local():
172 remotemap = phases.visiblebranchmap(remote.local())
173 else:
174 remotemap = remote.branchmap()
171 remotemap = remote.branchmap()
175 newbranches = branches - set(remotemap)
172 newbranches = branches - set(remotemap)
176 if newbranches and not newbranch: # new branch requires --new-branch
173 if newbranches and not newbranch: # new branch requires --new-branch
@@ -56,10 +56,10 class localpeer(peer.peerrepository):
56 return self._repo.lookup(key)
56 return self._repo.lookup(key)
57
57
58 def branchmap(self):
58 def branchmap(self):
59 return self._repo.branchmap()
59 return phases.visiblebranchmap(self._repo)
60
60
61 def heads(self):
61 def heads(self):
62 return self._repo.heads()
62 return phases.visibleheads(self._repo)
63
63
64 def known(self, nodes):
64 def known(self, nodes):
65 return self._repo.known(nodes)
65 return self._repo.known(nodes)
@@ -9,7 +9,6
9 from node import nullid
9 from node import nullid
10 from i18n import _
10 from i18n import _
11 import random, util, dagutil
11 import random, util, dagutil
12 import phases
13
12
14 def _updatesample(dag, nodes, sample, always, quicksamplesize=0):
13 def _updatesample(dag, nodes, sample, always, quicksamplesize=0):
15 # if nodes is empty we scan the entire graph
14 # if nodes is empty we scan the entire graph
@@ -100,7 +99,7 def findcommonheads(ui, local, remote,
100 sample = ownheads
99 sample = ownheads
101 if remote.local():
100 if remote.local():
102 # stopgap until we have a proper localpeer that supports batch()
101 # stopgap until we have a proper localpeer that supports batch()
103 srvheadhashes = phases.visibleheads(remote.local())
102 srvheadhashes = remote.heads()
104 yesno = remote.known(dag.externalizeall(sample))
103 yesno = remote.known(dag.externalizeall(sample))
105 elif remote.capable('batch'):
104 elif remote.capable('batch'):
106 batch = remote.batch()
105 batch = remote.batch()
General Comments 0
You need to be logged in to leave comments. Login now