diff -r bd1483fd7088 -r 7f0cb9ee0534 mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py Mon Jul 22 16:49:38 2024 +0200 +++ b/mercurial/setdiscovery.py Tue Jul 23 10:02:46 2024 +0200 @@ -190,6 +190,7 @@ return getparents def _childrengetter(self): + if self._childrenmap is not None: # During discovery, the `undecided` set keep shrinking. # Therefore, the map computed for an iteration N will be @@ -453,6 +454,7 @@ full = not initial_head_exchange progress = ui.makeprogress(_(b'searching'), unit=_(b'queries')) while not disco.iscomplete(): + if full or disco.hasinfo(): if full: ui.note(_(b"sampling from both directions\n"))