Patchwork [07,of,11] upgrade: drop the prefix to the 'supporteddestrequirements' function

login
register
mail settings
Submitter Pierre-Yves David
Date April 10, 2017, 4:48 p.m.
Message ID <775ab5c0fb7e04db436d.1491842938@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/20084/
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 1491840290 -7200
#      Mon Apr 10 18:04:50 2017 +0200
# Node ID 775ab5c0fb7e04db436dbc08d1114309f1d204f6
# Parent  e6379cf8208572bb5e919db628de8a7b2342113d
# 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 775ab5c0fb7e
upgrade: drop the prefix to the 'supporteddestrequirements' 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
@@ -62,7 +62,7 @@  def supportremovedrequirements(repo):
     """
     return set()
 
-def upgradesupporteddestrequirements(repo):
+def supporteddestrequirements(repo):
     """Obtain requirements that upgrade supports in the destination.
 
     If the result of the upgrade would create requirements not in this set,
@@ -280,7 +280,7 @@  def upgradedetermineactions(repo, improv
     """
     newactions = []
 
-    knownreqs = upgradesupporteddestrequirements(repo)
+    knownreqs = supporteddestrequirements(repo)
 
     for i in improvements:
         name = i.name
@@ -619,7 +619,7 @@  def upgraderepo(ui, repo, run=False, opt
                             'requirement: %s') %
                           _(', ').join(sorted(noaddreqs)))
 
-    unsupportedreqs = newreqs - upgradesupporteddestrequirements(repo)
+    unsupportedreqs = newreqs - supporteddestrequirements(repo)
     if unsupportedreqs:
         raise error.Abort(_('cannot upgrade repository; do not support '
                             'destination requirement: %s') %