mercurial/revlogutils/constants.py
changeset 46855 aba724bf550e
parent 46819 d4ba4d51f85f
child 46856 34e1fa4b548a
equal deleted inserted replaced
46854:6afb5ef1e776 46855:aba724bf550e
     9 
     9 
    10 from __future__ import absolute_import
    10 from __future__ import absolute_import
    11 
    11 
    12 from ..interfaces import repository
    12 from ..interfaces import repository
    13 
    13 
    14 # revlog header flags
    14 ### main revlog header
       
    15 
       
    16 ## revlog version
    15 REVLOGV0 = 0
    17 REVLOGV0 = 0
    16 REVLOGV1 = 1
    18 REVLOGV1 = 1
    17 # Dummy value until file format is finalized.
    19 # Dummy value until file format is finalized.
    18 REVLOGV2 = 0xDEAD
    20 REVLOGV2 = 0xDEAD
       
    21 
       
    22 ##  global revlog header flags
    19 # Shared across v1 and v2.
    23 # Shared across v1 and v2.
    20 FLAG_INLINE_DATA = 1 << 16
    24 FLAG_INLINE_DATA = 1 << 16
    21 # Only used by v1, implied by v2.
    25 # Only used by v1, implied by v2.
    22 FLAG_GENERALDELTA = 1 << 17
    26 FLAG_GENERALDELTA = 1 << 17
    23 REVLOG_DEFAULT_FLAGS = FLAG_INLINE_DATA
    27 REVLOG_DEFAULT_FLAGS = FLAG_INLINE_DATA
    24 REVLOG_DEFAULT_FORMAT = REVLOGV1
    28 REVLOG_DEFAULT_FORMAT = REVLOGV1
    25 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS
    29 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS
    26 REVLOGV1_FLAGS = FLAG_INLINE_DATA | FLAG_GENERALDELTA
    30 REVLOGV1_FLAGS = FLAG_INLINE_DATA | FLAG_GENERALDELTA
    27 REVLOGV2_FLAGS = FLAG_INLINE_DATA
    31 REVLOGV2_FLAGS = FLAG_INLINE_DATA
       
    32 
       
    33 ### individual entry
    28 
    34 
    29 # revlog index flags
    35 # revlog index flags
    30 
    36 
    31 # For historical reasons, revlog's internal flags were exposed via the
    37 # For historical reasons, revlog's internal flags were exposed via the
    32 # wire protocol and are even exposed in parts of the storage APIs.
    38 # wire protocol and are even exposed in parts of the storage APIs.