diff mercurial/upgrade.py @ 46205:53d083fa1f83

upgrade: rename finddeficiences() to find_format_upgrades() It was not obvious what does deficieny means and every format upgrade can't be a deficiency. There are some format upgrades like compression levels, share-safe which can't be understood at deficiencies. A change can be an upgrade or downgrade, however this `finddeficiences()` only used to find upgrades. This patch renames the function and related variables to make things more clearer. The ui message also got improved which is a good thing. Next patch will rename deficiency in general across the upgrade code. Differential Revision: https://phab.mercurial-scm.org/D9582
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 14 Dec 2020 16:03:15 +0530
parents 25d11b24dedf
children e2139e071b5c
line wrap: on
line diff
--- a/mercurial/upgrade.py	Sat Jan 02 01:48:12 2021 -0500
+++ b/mercurial/upgrade.py	Mon Dec 14 16:03:15 2020 +0530
@@ -97,9 +97,9 @@
             hint=_(b'run without arguments to see valid optimizations'),
         )
 
-    deficiencies = upgrade_actions.finddeficiencies(repo)
+    format_upgrades = upgrade_actions.find_format_upgrades(repo)
     actions = upgrade_actions.determineactions(
-        repo, deficiencies, repo.requirements, newreqs
+        repo, format_upgrades, repo.requirements, newreqs
     )
     actions.extend(
         o
@@ -135,7 +135,7 @@
         fromconfig = []
         onlydefault = []
 
-        for d in deficiencies:
+        for d in format_upgrades:
             if d.fromconfig(repo):
                 fromconfig.append(d)
             elif d.default:
@@ -165,12 +165,7 @@
 
             ui.status(b'\n')
         else:
-            ui.status(
-                _(
-                    b'(no feature deficiencies found in existing '
-                    b'repository)\n'
-                )
-            )
+            ui.status(_(b'(no format upgrades found in existing repository)\n'))
 
         ui.status(
             _(