util: log readinto() I/O
Differential Revision: https://phab.mercurial-scm.org/D2583
--- a/mercurial/util.py Fri Mar 02 22:47:18 2018 -0500
+++ b/mercurial/util.py Sat Mar 03 09:34:06 2018 -0500
@@ -749,6 +749,15 @@
self.fh.write('%s> readline() -> %d' % (self.name, len(res)))
self._writedata(res)
+ def readinto(self, res, dest):
+ if not self.reads:
+ return
+
+ self.fh.write('%s> readinto(%d) -> %r' % (self.name, len(dest),
+ res))
+ data = dest[0:res] if res is not None else b''
+ self._writedata(data)
+
def write(self, res, data):
if not self.writes:
return