Patchwork D9664: actions: rename DEFICIENCY constant to FORMAT_VARIANT

login
register
mail settings
Submitter phabricator
Date Dec. 30, 2020, 10:31 a.m.
Message ID <differential-rev-PHID-DREV-diofor4uoorzel5j24cs-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47975/
State Superseded
Headers show

Comments

phabricator - Dec. 30, 2020, 10:31 a.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9664

AFFECTED FILES
  mercurial/upgrade_utils/actions.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/upgrade_utils/actions.py b/mercurial/upgrade_utils/actions.py
--- a/mercurial/upgrade_utils/actions.py
+++ b/mercurial/upgrade_utils/actions.py
@@ -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