upgrade: drop the prefix to the 'requiredsourcerequirements' function
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 10 Apr 2017 17:55:47 +0200
changeset 31865 5dcaa0f4455b
parent 31864 70d163b86316
child 31866 1454726b6d7c
upgrade: drop the prefix to the 'requiredsourcerequirements' function Now that we are in the 'upgrade' module we can simplify the name.
mercurial/upgrade.py
--- a/mercurial/upgrade.py	Fri Apr 07 18:53:17 2017 +0200
+++ b/mercurial/upgrade.py	Mon Apr 10 17:55:47 2017 +0200
@@ -22,7 +22,7 @@
     vfs as vfsmod,
 )
 
-def upgraderequiredsourcerequirements(repo):
+def requiredsourcerequirements(repo):
     """Obtain requirements required to be present to upgrade a repo.
 
     An upgrade will not be allowed if the repository doesn't have the
@@ -591,7 +591,7 @@
     repo = repo.unfiltered()
 
     # Ensure the repository can be upgraded.
-    missingreqs = upgraderequiredsourcerequirements(repo) - repo.requirements
+    missingreqs = requiredsourcerequirements(repo) - repo.requirements
     if missingreqs:
         raise error.Abort(_('cannot upgrade repository; requirement '
                             'missing: %s') % _(', ').join(sorted(missingreqs)))