author | Pulkit Goyal <7895pulkit@gmail.com> |
Sat, 08 Aug 2020 16:37:59 +0530 | |
changeset 45373 | d7dcc75a3eae |
parent 45372 | 77b8588dd84e |
child 45374 | bd56597b2254 |
permissions | -rw-r--r-- |
45372
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
1 |
# requirements.py - objects and functions related to repository requirements |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
2 |
# |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
3 |
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
4 |
# |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
5 |
# This software may be used and distributed according to the terms of the |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
6 |
# GNU General Public License version 2 or any later version. |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
7 |
|
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
8 |
from __future__ import absolute_import |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
9 |
|
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
10 |
# When narrowing is finalized and no longer subject to format changes, |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
11 |
# we should move this to just "narrow" or similar. |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
12 |
NARROW_REQUIREMENT = b'narrowhg-experimental' |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
13 |
|
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
14 |
# Enables sparse working directory usage |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
15 |
SPARSE_REQUIREMENT = b'exp-sparse' |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
16 |
|
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
17 |
# Enables the internal phase which is used to hide changesets instead |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
18 |
# of stripping them |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
19 |
INTERNAL_PHASE_REQUIREMENT = b'internal-phase' |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
20 |
|
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
21 |
# Stores manifest in Tree structure |
77b8588dd84e
requirements: introduce new requirements related module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
22 |
TREEMANIFEST_REQUIREMENT = b'treemanifest' |
45373
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
23 |
|
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
24 |
# Increment the sub-version when the revlog v2 format changes to lock out old |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
25 |
# clients. |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
26 |
REVLOGV2_REQUIREMENT = b'exp-revlogv2.1' |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
27 |
|
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
28 |
# A repository with the sparserevlog feature will have delta chains that |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
29 |
# can spread over a larger span. Sparse reading cuts these large spans into |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
30 |
# pieces, so that each piece isn't too big. |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
31 |
# Without the sparserevlog capability, reading from the repository could use |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
32 |
# huge amounts of memory, because the whole span would be read at once, |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
33 |
# including all the intermediate revisions that aren't pertinent for the chain. |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
34 |
# This is why once a repository has enabled sparse-read, it becomes required. |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
35 |
SPARSEREVLOG_REQUIREMENT = b'sparserevlog' |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
36 |
|
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
37 |
# A repository with the sidedataflag requirement will allow to store extra |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
38 |
# information for revision without altering their original hashes. |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
39 |
SIDEDATA_REQUIREMENT = b'exp-sidedata-flag' |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
40 |
|
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
41 |
# A repository with the the copies-sidedata-changeset requirement will store |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
42 |
# copies related information in changeset's sidedata. |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
43 |
COPIESSDC_REQUIREMENT = b'exp-copies-sidedata-changeset' |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
44 |
|
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
45 |
# The repository use persistent nodemap for the changelog and the manifest. |
d7dcc75a3eae
localrepo: move requirements constant to requirements module
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45372
diff
changeset
|
46 |
NODEMAP_REQUIREMENT = b'persistent-nodemap' |