changeset 14430:c864f5e743ef

httprepo: handle large lengths by bypassing the len() operator
author Matt Mackall <mpm@selenic.com>
date Tue, 24 May 2011 17:30:00 -0500
parents c4c5e3802e9c
children a6b543e05305
files mercurial/httpconnection.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httpconnection.py	Tue May 24 14:52:23 2011 +0200
+++ b/mercurial/httpconnection.py	Tue May 24 17:30:00 2011 -0500
@@ -37,7 +37,7 @@
         self.write = self._data.write
         self._len = os.fstat(self._data.fileno()).st_size
         self._pos = 0
-        self._total = len(self) / 1024 * 2
+        self._total = self._len / 1024 * 2
 
     def read(self, *args, **kwargs):
         try: