Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/constants.py @ 42730:92ac6b1697a7
flagutil: move REVIDX_KNOWN_FLAGS source of truth in flagutil (API)
Since REVIDX_KNOWN_FLAGS is "not really a constant" (extension can update it)
and python integer,... it needs to be the responsability of a single module and
always accessed through the module. We update all the user and move the source
of truth in flagutil.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 08 Aug 2019 01:28:34 +0200 |
parents | e7a2cc84dbc0 |
children | 268662aac075 |
comparison
equal
deleted
inserted
replaced
42729:05c80f9ef100 | 42730:92ac6b1697a7 |
---|---|
9 | 9 |
10 from __future__ import absolute_import | 10 from __future__ import absolute_import |
11 | 11 |
12 from .. import ( | 12 from .. import ( |
13 repository, | 13 repository, |
14 util, | |
15 ) | 14 ) |
16 | 15 |
17 # revlog header flags | 16 # revlog header flags |
18 REVLOGV0 = 0 | 17 REVLOGV0 = 0 |
19 REVLOGV1 = 1 | 18 REVLOGV1 = 1 |
46 REVIDX_FLAGS_ORDER = [ | 45 REVIDX_FLAGS_ORDER = [ |
47 REVIDX_ISCENSORED, | 46 REVIDX_ISCENSORED, |
48 REVIDX_ELLIPSIS, | 47 REVIDX_ELLIPSIS, |
49 REVIDX_EXTSTORED, | 48 REVIDX_EXTSTORED, |
50 ] | 49 ] |
51 REVIDX_KNOWN_FLAGS = util.bitsfrom(REVIDX_FLAGS_ORDER) | 50 |
52 # bitmark for flags that could cause rawdata content change | 51 # bitmark for flags that could cause rawdata content change |
53 REVIDX_RAWTEXT_CHANGING_FLAGS = REVIDX_ISCENSORED | REVIDX_EXTSTORED | 52 REVIDX_RAWTEXT_CHANGING_FLAGS = REVIDX_ISCENSORED | REVIDX_EXTSTORED |
54 | 53 |
55 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 | 54 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 |
56 | 55 |