Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/constants.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | a12a9af7536c |
children | 2d6aea053153 |
comparison
equal
deleted
inserted
replaced
43075:57875cf423c9 | 43076:2372284d9457 |
---|---|
7 # GNU General Public License version 2 or any later version. | 7 # GNU General Public License version 2 or any later version. |
8 """Helper class to compute deltas stored inside revlogs""" | 8 """Helper class to compute deltas stored inside revlogs""" |
9 | 9 |
10 from __future__ import absolute_import | 10 from __future__ import absolute_import |
11 | 11 |
12 from ..interfaces import ( | 12 from ..interfaces import repository |
13 repository, | |
14 ) | |
15 | 13 |
16 # revlog header flags | 14 # revlog header flags |
17 REVLOGV0 = 0 | 15 REVLOGV0 = 0 |
18 REVLOGV1 = 1 | 16 REVLOGV1 = 1 |
19 # Dummy value until file format is finalized. | 17 # Dummy value until file format is finalized. |
20 # Reminder: change the bounds check in revlog.__init__ when this is changed. | 18 # Reminder: change the bounds check in revlog.__init__ when this is changed. |
21 REVLOGV2 = 0xDEAD | 19 REVLOGV2 = 0xDEAD |
22 # Shared across v1 and v2. | 20 # Shared across v1 and v2. |
23 FLAG_INLINE_DATA = (1 << 16) | 21 FLAG_INLINE_DATA = 1 << 16 |
24 # Only used by v1, implied by v2. | 22 # Only used by v1, implied by v2. |
25 FLAG_GENERALDELTA = (1 << 17) | 23 FLAG_GENERALDELTA = 1 << 17 |
26 REVLOG_DEFAULT_FLAGS = FLAG_INLINE_DATA | 24 REVLOG_DEFAULT_FLAGS = FLAG_INLINE_DATA |
27 REVLOG_DEFAULT_FORMAT = REVLOGV1 | 25 REVLOG_DEFAULT_FORMAT = REVLOGV1 |
28 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS | 26 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS |
29 REVLOGV1_FLAGS = FLAG_INLINE_DATA | FLAG_GENERALDELTA | 27 REVLOGV1_FLAGS = FLAG_INLINE_DATA | FLAG_GENERALDELTA |
30 REVLOGV2_FLAGS = FLAG_INLINE_DATA | 28 REVLOGV2_FLAGS = FLAG_INLINE_DATA |
51 REVIDX_SIDEDATA, | 49 REVIDX_SIDEDATA, |
52 ] | 50 ] |
53 | 51 |
54 # bitmark for flags that could cause rawdata content change | 52 # bitmark for flags that could cause rawdata content change |
55 REVIDX_RAWTEXT_CHANGING_FLAGS = ( | 53 REVIDX_RAWTEXT_CHANGING_FLAGS = ( |
56 REVIDX_ISCENSORED | 54 REVIDX_ISCENSORED | REVIDX_EXTSTORED | REVIDX_SIDEDATA |
57 | REVIDX_EXTSTORED | |
58 | REVIDX_SIDEDATA | |
59 ) | 55 ) |
60 | 56 |
61 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 | 57 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000 |
62 |