tree-discovery: fix the request debug output and progress location stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 26 Jul 2022 11:10:43 +0200
branchstable
changeset 49405 f64f66167afc
parent 49404 c6aac50038bb
child 49406 f69bffd00abe
tree-discovery: fix the request debug output and progress location This is now associated with each request.
mercurial/treediscovery.py
--- 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: