changeset 49394:f64f66167afc stable

tree-discovery: fix the request debug output and progress location This is now associated with each request.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 26 Jul 2022 11:10:43 +0200
parents c6aac50038bb
children f69bffd00abe
files mercurial/treediscovery.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/treediscovery.py	Tue Jul 26 10:48:06 2022 +0200
+++ b/mercurial/treediscovery.py	Tue Jul 26 11:10:43 2022 +0200
@@ -118,12 +118,13 @@
             seen.add(n[0])
 
         if r:
-            reqcnt += 1
-            progress.increment()
-            repo.ui.debug(
-                b"request %d: %s\n" % (reqcnt, b" ".join(map(short, r)))
-            )
             for p in range(0, len(r), 10):
+                reqcnt += 1
+                progress.increment()
+                if repo.ui.debugflag:
+                    msg = b"request %d: %s\n"
+                    msg %= (reqcnt, b" ".join(map(short, r)))
+                    repo.ui.debug(msg)
                 with remote.commandexecutor() as e:
                     subset = r[p : p + 10]
                     if audit is not None: