setdiscovery: stop using '_setupsample' in '_takefullsample'
Very few of the return values of '_setupsample' remain in use, so we
directly retrieve the value we care about and drop the '_setupsample'
call.
--- a/mercurial/setdiscovery.py Wed Jan 07 12:09:51 2015 -0800
+++ b/mercurial/setdiscovery.py Wed Jan 07 17:17:56 2015 -0800
@@ -105,9 +105,10 @@
return sample
def _takefullsample(dag, nodes, size):
- always, sample, desiredlen = _setupsample(dag, nodes, size)
- if sample is None:
+ always = dag.headsetofconnecteds(nodes)
+ if size <= len(always):
return always
+ sample = set()
# update from heads
_updatesample(dag, nodes, sample, always)
# update from roots