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

login
register
mail settings
Submitter Pierre-Yves David
Date April 10, 2017, 4:48 p.m.
Message ID <3702777e5bc3c0aaad5c.1491842935@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/20076/
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 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.

Patch

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