[Updated] D8859: keepalive: Do not append _rbuf if _raw_readinto exists (issue6356)

ced (Cédric Krier) phabricator at mercurial-scm.org
Sat Aug 8 21:02:13 UTC 2020


Closed by commit rHG49f8ba4febec: keepalive: Do not append _rbuf if _raw_readinto exists (issue6356) (authored by ced).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8859?vs=22175&id=22370

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8859/new/

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

AFFECTED FILES
  mercurial/keepalive.py

CHANGE DETAILS

diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py
--- a/mercurial/keepalive.py
+++ b/mercurial/keepalive.py
@@ -542,7 +542,11 @@
             return line
 
         # No newline in local buffer. Read until we find one.
-        chunks = [self._rbuf]
+        # readinto read via readinto will already return _rbuf
+        if self._raw_readinto is None:
+            chunks = [self._rbuf]
+        else:
+            chunks = []
         i = -1
         readsize = self._rbufsize
         while True:



To: ced, #hg-reviewers, marmoute, indygreg
Cc: indygreg, marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200808/c5b6db69/attachment-0002.html>


More information about the Mercurial-patches mailing list