diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py +++ b/mercurial/setdiscovery.py @@ -215,7 +215,12 @@ if sample: missinginsample = [n for i, n in enumerate(sample) if not yesno[i]] - missing.update(dag.descendantset(missinginsample, missing)) + + if missing: + missing.update(local.revs('descendants(%ld) - descendants(%ld)', + missinginsample, missing)) + else: + missing.update(local.revs('descendants(%ld)', missinginsample)) undecided.difference_update(missing)