changeset 20965:774ff56cbe34

merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 10 Apr 2014 12:41:39 -0400
parents a939eeb94833 (current diff) 469d949a7cb8 (diff)
children 63659b809021
files mercurial/revlog.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Fri Dec 20 14:56:05 2013 +0100
+++ b/mercurial/revlog.py	Thu Apr 10 12:41:39 2014 -0400
@@ -913,8 +913,13 @@
         ladd = l.append
 
         # preload the cache
-        self._chunkraw(revs[0], revs[-1])
-        offset, data = self._chunkcache
+        try:
+            self._chunkraw(revs[0], revs[-1])
+            offset, data = self._chunkcache
+        except OverflowError:
+            # issue4215 - we can't cache a run of chunks greater than
+            # 2G on Windows
+            return [self._chunk(rev) for rev in revs]
 
         for rev in revs:
             chunkstart = start(rev)