setdiscovery: drop unused 'initial' argument for '_takequicksample'
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 06 Jan 2015 16:32:23 -0800
changeset 23806 d6cbbe3baef0
parent 23805 345042e024dc
child 23807 e97e363a7000
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.
mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py	Sun Jan 11 16:46:13 2015 -0600
+++ b/mercurial/setdiscovery.py	Tue Jan 06 16:32:23 2015 -0800
@@ -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)