changeset 38314 | 565074cc9ac6 |
parent 38164 | aac4be30e250 |
child 38380 | 63e6f5ae84bc |
--- 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)))