--- a/mercurial/httppeer.py Fri Sep 07 23:36:09 2018 -0700
+++ b/mercurial/httppeer.py Sat Sep 08 23:57:07 2018 +0800
@@ -84,9 +84,10 @@
except httplib.IncompleteRead as e:
# e.expected is an integer if length known or None otherwise.
if e.expected:
+ got = len(e.partial)
+ total = e.expected + got
msg = _('HTTP request error (incomplete response; '
- 'expected %d bytes got %d)') % (e.expected,
- len(e.partial))
+ 'expected %d bytes got %d)') % (total, got)
else:
msg = _('HTTP request error (incomplete response)')