upgrade: drop the prefix to the 'improvement' class
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 10 Apr 2017 18:01:29 +0200
changeset 31868 9f84ccb1b282
parent 31867 cc60b6c36637
child 31869 fe5e30b58934
upgrade: drop the prefix to the 'improvement' class Now that we are in the 'upgrade' module we can simplify the name.
mercurial/upgrade.py
--- a/mercurial/upgrade.py	Mon Apr 10 18:00:27 2017 +0200
+++ b/mercurial/upgrade.py	Mon Apr 10 18:01:29 2017 +0200
@@ -97,7 +97,7 @@
 deficiency = 'deficiency'
 optimisation = 'optimization'
 
-class upgradeimprovement(object):
+class improvement(object):
     """Represents an improvement that can be made as part of an upgrade.
 
     The following attributes are defined on each instance:
@@ -156,7 +156,7 @@
     # requirements, so let's not bother.
 
     if 'fncache' not in repo.requirements:
-        improvements.append(upgradeimprovement(
+        improvements.append(improvement(
             name='fncache',
             type=deficiency,
             description=_('long and reserved filenames may not work correctly; '
@@ -168,7 +168,7 @@
             fromconfig='fncache' in newreporeqs))
 
     if 'dotencode' not in repo.requirements:
-        improvements.append(upgradeimprovement(
+        improvements.append(improvement(
             name='dotencode',
             type=deficiency,
             description=_('storage of filenames beginning with a period or '
@@ -179,7 +179,7 @@
             fromconfig='dotencode' in newreporeqs))
 
     if 'generaldelta' not in repo.requirements:
-        improvements.append(upgradeimprovement(
+        improvements.append(improvement(
             name='generaldelta',
             type=deficiency,
             description=_('deltas within internal storage are unable to '
@@ -203,7 +203,7 @@
     for rev in cl:
         chainbase = cl.chainbase(rev)
         if chainbase != rev:
-            improvements.append(upgradeimprovement(
+            improvements.append(improvement(
                 name='removecldeltachain',
                 type=deficiency,
                 description=_('changelog storage is using deltas instead of '
@@ -222,7 +222,7 @@
     # These are unconditionally added. There is logic later that figures out
     # which ones to apply.
 
-    improvements.append(upgradeimprovement(
+    improvements.append(improvement(
         name='redeltaparent',
         type=optimisation,
         description=_('deltas within internal storage will be recalculated to '
@@ -235,7 +235,7 @@
         upgrademessage=_('deltas within internal storage will choose a new '
                          'base revision if needed')))
 
-    improvements.append(upgradeimprovement(
+    improvements.append(improvement(
         name='redeltamultibase',
         type=optimisation,
         description=_('deltas within internal storage will be recalculated '
@@ -252,7 +252,7 @@
                          'parents; may slow down execution time '
                          'significantly')))
 
-    improvements.append(upgradeimprovement(
+    improvements.append(improvement(
         name='redeltaall',
         type=optimisation,
         description=_('deltas within internal storage will always be '