Show More
@@ -568,7 +568,7 b' def perfrevlogrevision(ui, repo, file_, ' | |||
|
568 | 568 | r.revision(node) |
|
569 | 569 | |
|
570 | 570 | chain = r._deltachain(rev)[0] |
|
571 | data = r._chunkraw(chain[0], chain[-1]) | |
|
571 | data = r._chunkraw(chain[0], chain[-1])[1] | |
|
572 | 572 | bins = r._chunks(chain) |
|
573 | 573 | text = str(bins[0]) |
|
574 | 574 | bins = bins[1:] |
@@ -1071,9 +1071,12 b' class revlog(object):' | |||
|
1071 | 1071 | |
|
1072 | 1072 | Requests for data may be satisfied by a cache. |
|
1073 | 1073 | |
|
1074 | Returns a str or a buffer instance of raw byte data. Callers will | |
|
1075 | need to call ``self.start(rev)`` and ``self.length()`` to determine | |
|
1076 | where each revision's data begins and ends. | |
|
1074 | Returns a 2-tuple of (offset, data) for the requested range of | |
|
1075 | revisions. Offset is the integer offset from the beginning of the | |
|
1076 | revlog and data is a str or buffer of the raw byte data. | |
|
1077 | ||
|
1078 | Callers will need to call ``self.start(rev)`` and ``self.length(rev)`` | |
|
1079 | to determine where each revision's data begins and ends. | |
|
1077 | 1080 | """ |
|
1078 | 1081 | start = self.start(startrev) |
|
1079 | 1082 | end = self.end(endrev) |
@@ -1081,7 +1084,8 b' class revlog(object):' | |||
|
1081 | 1084 | start += (startrev + 1) * self._io.size |
|
1082 | 1085 | end += (endrev + 1) * self._io.size |
|
1083 | 1086 | length = end - start |
|
1084 | return self._getchunk(start, length, df=df) | |
|
1087 | ||
|
1088 | return start, self._getchunk(start, length, df=df) | |
|
1085 | 1089 | |
|
1086 | 1090 | def _chunk(self, rev, df=None): |
|
1087 | 1091 | """Obtain a single decompressed chunk for a revision. |
@@ -1092,7 +1096,7 b' class revlog(object):' | |||
|
1092 | 1096 | |
|
1093 | 1097 | Returns a str holding uncompressed data for the requested revision. |
|
1094 | 1098 | """ |
|
1095 | return decompress(self._chunkraw(rev, rev, df=df)) | |
|
1099 | return decompress(self._chunkraw(rev, rev, df=df)[1]) | |
|
1096 | 1100 | |
|
1097 | 1101 | def _chunks(self, revs, df=None): |
|
1098 | 1102 | """Obtain decompressed chunks for the specified revisions. |
@@ -1123,7 +1127,7 b' class revlog(object):' | |||
|
1123 | 1127 | while True: |
|
1124 | 1128 | # ensure that the cache doesn't change out from under us |
|
1125 | 1129 | _cache = self._chunkcache |
|
1126 | self._chunkraw(revs[0], revs[-1], df=df) | |
|
1130 | self._chunkraw(revs[0], revs[-1], df=df)[1] | |
|
1127 | 1131 | if _cache == self._chunkcache: |
|
1128 | 1132 | break |
|
1129 | 1133 | offset, data = _cache |
@@ -1267,7 +1271,7 b' class revlog(object):' | |||
|
1267 | 1271 | df = self.opener(self.datafile, 'w') |
|
1268 | 1272 | try: |
|
1269 | 1273 | for r in self: |
|
1270 | df.write(self._chunkraw(r, r)) | |
|
1274 | df.write(self._chunkraw(r, r)[1]) | |
|
1271 | 1275 | finally: |
|
1272 | 1276 | df.close() |
|
1273 | 1277 |
General Comments 0
You need to be logged in to leave comments.
Login now