mercurial/revlog.py
changeset 47268 87d057137f82
parent 47267 2b69555e4875
child 47269 c4dbb7636a12
equal deleted inserted replaced
47267:2b69555e4875 47268:87d057137f82
  2059         if self._inline:
  2059         if self._inline:
  2060             sidedata_offset += self.index.entry_size * (1 + rev)
  2060             sidedata_offset += self.index.entry_size * (1 + rev)
  2061         if sidedata_size == 0:
  2061         if sidedata_size == 0:
  2062             return {}
  2062             return {}
  2063 
  2063 
  2064         segment = self._getsegment(sidedata_offset, sidedata_size)
  2064         comp_segment = self._getsegment(sidedata_offset, sidedata_size)
       
  2065         comp = self.index[rev][11]
       
  2066         if comp == COMP_MODE_PLAIN:
       
  2067             segment = comp_segment
       
  2068         elif comp == COMP_MODE_DEFAULT:
       
  2069             segment = self._decompressor(comp_segment)
       
  2070         elif comp == COMP_MODE_INLINE:
       
  2071             segment = self.decompress(comp_segment)
       
  2072         else:
       
  2073             msg = 'unknown compression mode %d'
       
  2074             msg %= comp
       
  2075             raise error.RevlogError(msg)
       
  2076 
  2065         sidedata = sidedatautil.deserialize_sidedata(segment)
  2077         sidedata = sidedatautil.deserialize_sidedata(segment)
  2066         return sidedata
  2078         return sidedata
  2067 
  2079 
  2068     def rawdata(self, nodeorrev, _df=None):
  2080     def rawdata(self, nodeorrev, _df=None):
  2069         """return an uncompressed raw data of a given node or revision number.
  2081         """return an uncompressed raw data of a given node or revision number.