changeset 48899:563eb25e079b

windows: remove write throttling support This mode would only be active on Python 2, which is no longer supported. Differential Revision: https://phab.mercurial-scm.org/D12302
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 10:38:27 -0700
parents a98e32e5fca1
children 5ed68dc64948
files mercurial/windows.py
diffstat 1 files changed, 1 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/windows.py	Mon Feb 21 10:36:44 2022 -0700
+++ b/mercurial/windows.py	Mon Feb 21 10:38:27 2022 -0700
@@ -225,7 +225,6 @@
 
     def __init__(self, fp):
         self.fp = fp
-        self.throttle = not pycompat.ispy3 and _isatty(fp)
 
     def __getattr__(self, key):
         return getattr(self.fp, key)
@@ -238,17 +237,7 @@
 
     def write(self, s):
         try:
-            if not self.throttle:
-                return self.fp.write(s)
-            # This is workaround for "Not enough space" error on
-            # writing large size of data to console.
-            limit = 16000
-            l = len(s)
-            start = 0
-            while start < l:
-                end = start + limit
-                self.fp.write(s[start:end])
-                start = end
+            return self.fp.write(s)
         except IOError as inst:
             if inst.errno != 0 and not win32.lasterrorwaspipeerror(inst):
                 raise