Mercurial > public > mercurial-scm > hg
diff mercurial/setdiscovery.py @ 23812:db58186dd8e3
setdiscovery: directly run '_updatesample'
The heads and exponential sample are going to end up in the same set
before any extra processing happens. We simplify the code by directly
updating a set with heads.
Changes in the order the set is built lead to small changes in the random
sampling output. But after double checking, I can confirm the input data to
the random sampling is consistent.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 07 Jan 2015 17:23:21 -0800 |
parents | e2b262e2ee73 |
children | 932f814bf016 |
line wrap: on
line diff
--- a/mercurial/setdiscovery.py Wed Jan 07 17:17:56 2015 -0800 +++ b/mercurial/setdiscovery.py Wed Jan 07 17:23:21 2015 -0800 @@ -108,7 +108,7 @@ always = dag.headsetofconnecteds(nodes) if size <= len(always): return always - sample = set() + sample = always # update from heads _updatesample(dag, nodes, sample, always) # update from roots