##// END OF EJS Templates
revlog: minor refactor in the chunk gather process...
marmoute -
r52000:c2d2e5b6 default
parent child Browse files
Show More
@@ -901,6 +901,8 b' class _InnerRevlog:'
901 901
902 902 l = []
903 903 ladd = l.append
904 chunks = []
905 ladd = chunks.append
904 906
905 907 if not self.data_config.with_sparse_read:
906 908 slicedchunks = (revs,)
@@ -923,7 +925,8 b' class _InnerRevlog:'
923 925 except OverflowError:
924 926 # issue4215 - we can't cache a run of chunks greater than
925 927 # 2G on Windows
926 return [self._chunk(rev) for rev in revschunk]
928 for rev in revschunk:
929 ladd((rev, self._chunk(rev)))
927 930
928 931 decomp = self.decompress
929 932 # self._decompressor might be None, but will not be used in that case
@@ -936,17 +939,18 b' class _InnerRevlog:'
936 939 comp_mode = self.index[rev][10]
937 940 c = buffer(data, chunkstart - offset, chunklength)
938 941 if comp_mode == COMP_MODE_PLAIN:
939 ladd(c)
942 c = c
940 943 elif comp_mode == COMP_MODE_INLINE:
941 ladd(decomp(c))
944 c = decomp(c)
942 945 elif comp_mode == COMP_MODE_DEFAULT:
943 ladd(def_decomp(c))
946 c = def_decomp(c)
944 947 else:
945 948 msg = b'unknown compression mode %d'
946 949 msg %= comp_mode
947 950 raise error.RevlogError(msg)
948
949 return l
951 ladd((rev, c))
952
953 return [x[1] for x in chunks]
950 954
951 955 def raw_text(self, node, rev):
952 956 """return the possibly unvalidated rawtext for a revision
General Comments 0
You need to be logged in to leave comments. Login now