Patchwork [08,of,11] upgrade: drop the prefix to the 'findimprovements' function

login
register
mail settings
Submitter Pierre-Yves David
Date April 10, 2017, 4:48 p.m.
Message ID <845f34ca3f9edf4d9b44.1491842939@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/20080/
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 1491840342 -7200
#      Mon Apr 10 18:05:42 2017 +0200
# Node ID 845f34ca3f9edf4d9b440024d46b36b41b6e7372
# Parent  775ab5c0fb7e04db436dbc08d1114309f1d204f6
# 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 845f34ca3f9e
upgrade: drop the prefix to the 'findimprovements' 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
@@ -138,7 +138,7 @@  class improvement(object):
         for k, v in kwargs.items():
             setattr(self, k, v)
 
-def upgradefindimprovements(repo):
+def findimprovements(repo):
     """Determine improvements that can be made to the repo during upgrade.
 
     Returns a list of ``upgradeimprovement`` describing repository deficiencies
@@ -626,7 +626,7 @@  def upgraderepo(ui, repo, run=False, opt
                           _(', ').join(sorted(unsupportedreqs)))
 
     # Find and validate all improvements that can be made.
-    improvements = upgradefindimprovements(repo)
+    improvements = findimprovements(repo)
     for i in improvements:
         if i.type not in (deficiency, optimisation):
             raise error.Abort(_('unexpected improvement type %s for %s') % (