mercurial/streamclone.py
changeset 51584 8cd317c033b8
parent 51549 49faa72b994e
child 51686 493034cc3265
--- a/mercurial/streamclone.py	Tue Apr 09 02:54:19 2024 +0200
+++ b/mercurial/streamclone.py	Sun Apr 14 02:33:36 2024 +0200
@@ -646,11 +646,12 @@
 
     max_linkrev = len(repo)
     file_count = totalfilesize = 0
-    # record the expected size of every file
-    for k, vfs, e in entries:
-        for f in e.files():
-            file_count += 1
-            totalfilesize += f.file_size(vfs)
+    with util.nogc():
+        # record the expected size of every file
+        for k, vfs, e in entries:
+            for f in e.files():
+                file_count += 1
+                totalfilesize += f.file_size(vfs)
 
     progress = repo.ui.makeprogress(
         _(b'bundle'), total=totalfilesize, unit=_(b'bytes')