discovery: do not build sample if undecided is smaller than sample size
This prevents crash with coming change in the mercurial discovery.
--- a/hgext/evolve.py Mon Jan 05 19:04:32 2015 -0800
+++ b/hgext/evolve.py Wed Jan 07 15:24:47 2015 -0800
@@ -2390,7 +2390,10 @@
while undecided:
ui.note(_("sampling from both directions\n"))
- sample = _takefullsample(dag, undecided, size=fullsamplesize)
+ if len(undecided) < fullsamplesize:
+ sample = set(undecided)
+ else:
+ sample = _takefullsample(dag, undecided, size=fullsamplesize)
roundtrips += 1
ui.debug("query %i; still undecided: %i, sample size is: %i\n"