diff -r 275cc461b854 -r 565074cc9ac6 mercurial/util.py --- a/mercurial/util.py Thu Jun 14 11:47:51 2018 -0400 +++ b/mercurial/util.py Thu Jun 14 11:49:10 2018 -0400 @@ -782,6 +782,13 @@ if res is None: res = '' + if size == -1 and res == '': + # Suppress pointless read(-1) calls that return + # nothing. These happen _a lot_ on Python 3, and there + # doesn't seem to be a better workaround to have matching + # Python 2 and 3 behavior. :( + return + if self.logdataapis: self.fh.write('%s> read(%d) -> %d' % (self.name, size, len(res)))