mercurial/streamclone.py
branchstable
changeset 52184 e4b242f9d4d9
parent 52015 a47f09da8bd1
child 52356 46574e588017
child 53028 89ab2459f62a
--- a/mercurial/streamclone.py	Mon Nov 04 17:42:30 2024 -0500
+++ b/mercurial/streamclone.py	Mon Nov 04 16:43:05 2024 -0500
@@ -582,8 +582,10 @@
     """
 
     # arbitrarily picked as "it seemed fine" and much higher than the current
-    # usage.
-    MAX_OPEN = 100
+    # usage.  The Windows value of 2 is actually 1 file open at a time, due to
+    # the `flush_count = self.MAX_OPEN // 2` and `self.MAX_OPEN - 1` threshold
+    # for flushing to disk in __call__().
+    MAX_OPEN = 2 if pycompat.iswindows else 100
 
     def __init__(self):
         self._counter = 0