Mercurial > hg
diff mercurial/upgrade_utils/actions.py @ 46206:9540945e51fd
actions: rename DEFICIENCY constant to FORMAT_VARIANT
It was not obvious what does deficieny means and every format change can't be a
deficiency. There are some format changes like compression levels, share-safe
which can't be understood at deficiencies.
This patch renames the constant to make things clearer.
Differential Revision: https://phab.mercurial-scm.org/D9664
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 30 Dec 2020 14:56:34 +0530 |
parents | 53d083fa1f83 |
children | a51d345f1404 |
line wrap: on
line diff
--- a/mercurial/upgrade_utils/actions.py Mon Dec 14 16:03:15 2020 +0530 +++ b/mercurial/upgrade_utils/actions.py Wed Dec 30 14:56:34 2020 +0530 @@ -28,7 +28,7 @@ return set() -DEFICIENCY = b'deficiency' +FORMAT_VARIANT = b'deficiency' OPTIMISATION = b'optimization' @@ -42,13 +42,15 @@ will be mapped to an action later in the upgrade process. type - Either ``DEFICIENCY`` or ``OPTIMISATION``. A deficiency is an obvious - problem. An optimization is an action (sometimes optional) that + Either ``FORMAT_VARIANT`` or ``OPTIMISATION``. + A format variant is where we change the storage format. Not all format + variant changes are an obvious problem. + An optimization is an action (sometimes optional) that can be taken to further improve the state of the repository. description Message intended for humans explaining the improvement in more detail, - including the implications of it. For ``DEFICIENCY`` types, should be + including the implications of it. For ``FORMAT_VARIANT`` types, should be worded in the present tense. For ``OPTIMISATION`` types, should be worded in the future tense. @@ -87,7 +89,7 @@ class formatvariant(improvement): """an improvement subclass dedicated to repository format""" - type = DEFICIENCY + type = FORMAT_VARIANT ### The following attributes should be defined for each class: # machine-readable string uniquely identifying this improvement. it will be @@ -95,7 +97,8 @@ name = None # message intended for humans explaining the improvement in more detail, - # including the implications of it ``DEFICIENCY`` types, should be worded + # including the implications of it ``FORMAT_VARIANT`` types, should be + # worded # in the present tense. description = None