Mercurial > hg > mercurial-source
changeset 23818:d6cbbe3baef0
setdiscovery: drop unused 'initial' argument for '_takequicksample'
There is a single call site, and it is always using 'initial=True'. So we just drop
the argument and the associated condition.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 06 Jan 2015 16:32:23 -0800 |
parents | 345042e024dc |
children | e97e363a7000 |
files | mercurial/setdiscovery.py |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/setdiscovery.py +++ b/mercurial/setdiscovery.py @@ -84,15 +84,11 @@ return always, None, desiredlen return always, set(), desiredlen -def _takequicksample(dag, nodes, size, initial): +def _takequicksample(dag, nodes, size): always, sample, desiredlen = _setupsample(dag, nodes, size) if sample is None: return always - if initial: - fromset = None - else: - fromset = nodes - _updatesample(dag, fromset, sample, always, quicksamplesize=desiredlen) + _updatesample(dag, None, sample, always, quicksamplesize=desiredlen) sample.update(always) return sample @@ -207,8 +203,7 @@ else: # use even cheaper initial sample ui.debug("taking quick initial sample\n") - sample = _takequicksample(dag, undecided, size=initialsamplesize, - initial=True) + sample = _takequicksample(dag, undecided, size=initialsamplesize) targetsize = initialsamplesize sample = _limitsample(sample, targetsize)