diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py +++ b/mercurial/setdiscovery.py @@ -107,12 +107,16 @@ :size: the maximum size of the sample""" sample = dag.headsetofconnecteds(nodes) if len(sample) >= size: - return _limitsample(sample, size) + # Return full set of heads, without limiting + return sample _updatesample(dag, None, sample, quicksamplesize=size) return sample def _takefullsample(dag, nodes, size): sample = dag.headsetofconnecteds(nodes) + if len(sample) >= size: + # Return full set of heads, without limiting + return sample # update from heads _updatesample(dag, nodes, sample) # update from roots