Patchwork [06,of,11] upgrade: drop the prefix to the 'allowednewrequirements' function

login
register
mail settings
Submitter Pierre-Yves David
Date April 10, 2017, 4:48 p.m.
Message ID <e6379cf8208572bb5e91.1491842937@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/20085/
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 1491840191 -7200
#      Mon Apr 10 18:03:11 2017 +0200
# Node ID e6379cf8208572bb5e919db628de8a7b2342113d
# Parent  4e1fbf6c9d18edde1f05e844d43382221bb3a26e
# 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 e6379cf82085
upgrade: drop the prefix to the 'allowednewrequirements' 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
@@ -78,7 +78,7 @@  def upgradesupporteddestrequirements(rep
         'store',
     ])
 
-def upgradeallowednewrequirements(repo):
+def allowednewrequirements(repo):
     """Obtain requirements that can be added to a repository during upgrade.
 
     This is used to disallow proposed requirements from being added when
@@ -613,7 +613,7 @@  def upgraderepo(ui, repo, run=False, opt
                             'removed: %s') % _(', ').join(sorted(noremovereqs)))
 
     noaddreqs = (newreqs - repo.requirements -
-                 upgradeallowednewrequirements(repo))
+                 allowednewrequirements(repo))
     if noaddreqs:
         raise error.Abort(_('cannot upgrade repository; do not support adding '
                             'requirement: %s') %