##// END OF EJS Templates
setdiscovery: back out changeset 5cfdf6137af8 (issue5809)...
Martin von Zweigbergk -
r36732:613954a1 default
parent child Browse files
Show More
@@ -57,7 +57,7 def findcommonincoming(repo, remote, hea
57 if all(knownnode(h) for h in heads):
57 if all(knownnode(h) for h in heads):
58 return (heads, False, heads)
58 return (heads, False, heads)
59
59
60 res = setdiscovery.findcommonheads(repo.ui, repo, remote, heads,
60 res = setdiscovery.findcommonheads(repo.ui, repo, remote,
61 abortwhenunrelated=not force,
61 abortwhenunrelated=not force,
62 ancestorsof=ancestorsof)
62 ancestorsof=ancestorsof)
63 common, anyinc, srvheads = res
63 common, anyinc, srvheads = res
@@ -130,7 +130,7 def _limitsample(sample, desiredlen):
130 sample = set(random.sample(sample, desiredlen))
130 sample = set(random.sample(sample, desiredlen))
131 return sample
131 return sample
132
132
133 def findcommonheads(ui, local, remote, heads=None,
133 def findcommonheads(ui, local, remote,
134 initialsamplesize=100,
134 initialsamplesize=100,
135 fullsamplesize=200,
135 fullsamplesize=200,
136 abortwhenunrelated=True,
136 abortwhenunrelated=True,
@@ -155,10 +155,6 def findcommonheads(ui, local, remote, h
155 sample = _limitsample(ownheads, initialsamplesize)
155 sample = _limitsample(ownheads, initialsamplesize)
156 # indices between sample and externalized version must match
156 # indices between sample and externalized version must match
157 sample = list(sample)
157 sample = list(sample)
158 if heads:
159 srvheadhashes = heads
160 yesno = remote.known(dag.externalizeall(sample))
161 else:
162 batch = remote.iterbatch()
158 batch = remote.iterbatch()
163 batch.heads()
159 batch.heads()
164 batch.known(dag.externalizeall(sample))
160 batch.known(dag.externalizeall(sample))
General Comments 0
You need to be logged in to leave comments. Login now