mercurial/pure/parsers.py
changeset 47259 07641bafa646
parent 47256 2b69555e4875
child 47262 468e451fc0de
equal deleted inserted replaced
47258:c4dbb7636a12 47259:07641bafa646
   295 
   295 
   296 class Index2Mixin(object):
   296 class Index2Mixin(object):
   297     index_format = revlog_constants.INDEX_ENTRY_V2
   297     index_format = revlog_constants.INDEX_ENTRY_V2
   298 
   298 
   299     def replace_sidedata_info(
   299     def replace_sidedata_info(
   300         self, rev, sidedata_offset, sidedata_length, offset_flags
   300         self,
       
   301         rev,
       
   302         sidedata_offset,
       
   303         sidedata_length,
       
   304         offset_flags,
       
   305         compression_mode,
   301     ):
   306     ):
   302         """
   307         """
   303         Replace an existing index entry's sidedata offset and length with new
   308         Replace an existing index entry's sidedata offset and length with new
   304         ones.
   309         ones.
   305         This cannot be used outside of the context of sidedata rewriting,
   310         This cannot be used outside of the context of sidedata rewriting,
   314         else:
   319         else:
   315             entry = list(self[rev])
   320             entry = list(self[rev])
   316             entry[0] = offset_flags
   321             entry[0] = offset_flags
   317             entry[8] = sidedata_offset
   322             entry[8] = sidedata_offset
   318             entry[9] = sidedata_length
   323             entry[9] = sidedata_length
       
   324             entry[11] = compression_mode
   319             entry = tuple(entry)
   325             entry = tuple(entry)
   320             new = self._pack_entry(entry)
   326             new = self._pack_entry(entry)
   321             self._extra[rev - self._lgt] = new
   327             self._extra[rev - self._lgt] = new
   322 
   328 
   323     def _unpack_entry(self, data):
   329     def _unpack_entry(self, data):