Show More
@@ -1949,7 +1949,7 b' class revlog(object):' | |||
|
1949 | 1949 | """ |
|
1950 | 1950 | return self.decompress(self._getsegmentforrevs(rev, rev, df=df)[1]) |
|
1951 | 1951 | |
|
1952 | def _chunks(self, revs, df=None): | |
|
1952 | def _chunks(self, revs, df=None, targetsize=None): | |
|
1953 | 1953 | """Obtain decompressed chunks for the specified revisions. |
|
1954 | 1954 | |
|
1955 | 1955 | Accepts an iterable of numeric revisions that are assumed to be in |
@@ -1976,7 +1976,7 b' class revlog(object):' | |||
|
1976 | 1976 | if not self._withsparseread: |
|
1977 | 1977 | slicedchunks = (revs,) |
|
1978 | 1978 | else: |
|
1979 | slicedchunks = _slicechunk(self, revs) | |
|
1979 | slicedchunks = _slicechunk(self, revs, targetsize) | |
|
1980 | 1980 | |
|
1981 | 1981 | for revschunk in slicedchunks: |
|
1982 | 1982 | firstrev = revschunk[0] |
@@ -2079,7 +2079,12 b' class revlog(object):' | |||
|
2079 | 2079 | # drop cache to save memory |
|
2080 | 2080 | self._cache = None |
|
2081 | 2081 | |
|
2082 | bins = self._chunks(chain, df=_df) | |
|
2082 | targetsize = None | |
|
2083 | rawsize = self.index[rev][2] | |
|
2084 | if 0 <= rawsize: | |
|
2085 | targetsize = 4 * rawsize | |
|
2086 | ||
|
2087 | bins = self._chunks(chain, df=_df, targetsize=targetsize) | |
|
2083 | 2088 | if rawtext is None: |
|
2084 | 2089 | rawtext = bytes(bins[0]) |
|
2085 | 2090 | bins = bins[1:] |
General Comments 0
You need to be logged in to leave comments.
Login now