[PATCH 04 of 11] upgrade: drop the prefix to the 'supportremovedrequirements' function

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


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1491840027 -7200
#      Mon Apr 10 18:00:27 2017 +0200
# Node ID 3702777e5bc3c0aaad5cad7824d0eb342aad2419
# Parent  8fe814f1ebb0f8bf451302fd365590cd2acedefe
# 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 3702777e5bc3
upgrade: drop the prefix to the 'supportremovedrequirements' 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
@@ -53,7 +53,7 @@ def blocksourcerequirements(repo):
         'shared',
     ])
 
-def upgradesupportremovedrequirements(repo):
+def supportremovedrequirements(repo):
     """Obtain requirements that can be removed during an upgrade.
 
     If an upgrade were to create a repository that dropped a requirement,
@@ -607,7 +607,7 @@ def upgraderepo(ui, repo, run=False, opt
     newreqs = localrepo.newreporequirements(repo)
 
     noremovereqs = (repo.requirements - newreqs -
-                   upgradesupportremovedrequirements(repo))
+                   supportremovedrequirements(repo))
     if noremovereqs:
         raise error.Abort(_('cannot upgrade repository; requirement would be '
                             'removed: %s') % _(', ').join(sorted(noremovereqs)))


More information about the Mercurial-devel mailing list