Patchwork D12302: windows: remove write throttling support

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 11:31 p.m.
Message ID <differential-rev-PHID-DREV-525osfdk2ud2q3c3lxar-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50640/
State New
Headers show

Comments

phabricator - March 2, 2022, 11:31 p.m.
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This mode would only be active on Python 2, which is no longer supported.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12302

AFFECTED FILES
  mercurial/windows.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/windows.py b/mercurial/windows.py
--- a/mercurial/windows.py
+++ b/mercurial/windows.py
@@ -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