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

login
register
mail settings
Submitter Pierre-Yves David
Date April 10, 2017, 4:48 p.m.
Message ID <8fe814f1ebb0f8bf4513.1491842934@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/20078/
State Accepted
Headers show

Comments

Pierre-Yves David - April 10, 2017, 4:48 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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') %