mercurial/revlog.py
changeset 32392 36d3559c69a6
parent 32372 df448de7cf3b
child 32393 d47b62368f3a
equal deleted inserted replaced
32391:3ea1f1e71a0a 32392:36d3559c69a6
   326         self.version = v
   326         self.version = v
   327         self._inline = v & FLAG_INLINE_DATA
   327         self._inline = v & FLAG_INLINE_DATA
   328         self._generaldelta = v & FLAG_GENERALDELTA
   328         self._generaldelta = v & FLAG_GENERALDELTA
   329         flags = v & ~0xFFFF
   329         flags = v & ~0xFFFF
   330         fmt = v & 0xFFFF
   330         fmt = v & 0xFFFF
   331         if fmt == REVLOGV0 and flags:
   331         if fmt == REVLOGV0:
   332             raise RevlogError(_("index %s unknown flags %#04x for format v0")
   332             if flags:
   333                               % (self.indexfile, flags >> 16))
   333                 raise RevlogError(_('unknown flags (%#04x) in version %d '
   334         elif fmt == REVLOGV1 and flags & ~REVLOGV1_FLAGS:
   334                                     'revlog %s') %
   335             raise RevlogError(_("index %s unknown flags %#04x for revlogng")
   335                                   (flags >> 16, fmt, self.indexfile))
   336                               % (self.indexfile, flags >> 16))
   336         elif fmt == REVLOGV1:
   337         elif fmt > REVLOGV1:
   337             if flags & ~REVLOGV1_FLAGS:
   338             raise RevlogError(_("index %s unknown format %d")
   338                 raise RevlogError(_('unknown flags (%#04x) in version %d '
   339                               % (self.indexfile, fmt))
   339                                     'revlog %s') %
       
   340                                   (flags >> 16, fmt, self.indexfile))
       
   341         else:
       
   342             raise RevlogError(_('unknown version (%d) in revlog %s') %
       
   343                               (fmt, self.indexfile))
   340 
   344 
   341         self.storedeltachains = True
   345         self.storedeltachains = True
   342 
   346 
   343         self._io = revlogio()
   347         self._io = revlogio()
   344         if self.version == REVLOGV0:
   348         if self.version == REVLOGV0: