setdiscovery: drop '_setupsample' usage in '_takequicksample'
For '_takefullsample' we can just retrieve the list of head directly and
ignore the rest of the complex return values. This was the last call to the
infamous '_updatesample' function.
--- a/mercurial/setdiscovery.py Wed Jan 07 10:32:17 2015 -0800
+++ b/mercurial/setdiscovery.py Tue Jan 06 17:07:44 2015 -0800
@@ -95,10 +95,9 @@
return always, set(), desiredlen
def _takequicksample(dag, nodes, size):
- always, sample, desiredlen = _setupsample(dag, nodes, size)
- if sample is None:
- return always
- sample = always
+ sample = dag.headsetofconnecteds(nodes)
+ if size <= len(sample):
+ return _limitsample(sample, size)
_updatesample(dag, None, sample, quicksamplesize=size)
return sample