[PATCH 07 of 11] upgrade: drop the prefix to the 'supporteddestrequirements' function

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Apr 10 12:48:58 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1491840290 -7200
#      Mon Apr 10 18:04:50 2017 +0200
# Node ID 775ab5c0fb7e04db436dbc08d1114309f1d204f6
# Parent  e6379cf8208572bb5e919db628de8a7b2342113d
# EXP-Topic upgraderepo
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 775ab5c0fb7e
upgrade: drop the prefix to the 'supporteddestrequirements' function

Now that we are in the 'upgrade' module we can simplify the name.

diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -62,7 +62,7 @@ def supportremovedrequirements(repo):
     """
     return set()
 
-def upgradesupporteddestrequirements(repo):
+def supporteddestrequirements(repo):
     """Obtain requirements that upgrade supports in the destination.
 
     If the result of the upgrade would create requirements not in this set,
@@ -280,7 +280,7 @@ def upgradedetermineactions(repo, improv
     """
     newactions = []
 
-    knownreqs = upgradesupporteddestrequirements(repo)
+    knownreqs = supporteddestrequirements(repo)
 
     for i in improvements:
         name = i.name
@@ -619,7 +619,7 @@ def upgraderepo(ui, repo, run=False, opt
                             'requirement: %s') %
                           _(', ').join(sorted(noaddreqs)))
 
-    unsupportedreqs = newreqs - upgradesupporteddestrequirements(repo)
+    unsupportedreqs = newreqs - supporteddestrequirements(repo)
     if unsupportedreqs:
         raise error.Abort(_('cannot upgrade repository; do not support '
                             'destination requirement: %s') %


More information about the Mercurial-devel mailing list