[PATCH 03 of 11] upgrade: drop the prefix to the 'blocksourcerequirements' function

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


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1491839789 -7200
#      Mon Apr 10 17:56:29 2017 +0200
# Node ID 8fe814f1ebb0f8bf451302fd365590cd2acedefe
# Parent  87d0810204a070cc3c6e695c4f1fe8e097b44a51
# 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 8fe814f1ebb0
upgrade: drop the prefix to the 'blocksourcerequirements' 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
@@ -35,7 +35,7 @@ def requiredsourcerequirements(repo):
         'store',
     ])
 
-def upgradeblocksourcerequirements(repo):
+def blocksourcerequirements(repo):
     """Obtain requirements that will prevent an upgrade from occurring.
 
     An upgrade cannot be performed if the source repository contains a
@@ -596,7 +596,7 @@ def upgraderepo(ui, repo, run=False, opt
         raise error.Abort(_('cannot upgrade repository; requirement '
                             'missing: %s') % _(', ').join(sorted(missingreqs)))
 
-    blockedreqs = upgradeblocksourcerequirements(repo) & repo.requirements
+    blockedreqs = blocksourcerequirements(repo) & repo.requirements
     if blockedreqs:
         raise error.Abort(_('cannot upgrade repository; unsupported source '
                             'requirement: %s') %


More information about the Mercurial-devel mailing list