Mercurial > public > mercurial-scm > hg
comparison mercurial/upgrade.py @ 31871:5881f76323c2
upgrade: drop the prefix to the 'findimprovements' function
Now that we are in the 'upgrade' module we can simplify the name.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 10 Apr 2017 18:05:42 +0200 |
parents | 49011f1cedd4 |
children | 3c001db97c71 |
comparison
equal
deleted
inserted
replaced
31870:49011f1cedd4 | 31871:5881f76323c2 |
---|---|
136 self.upgrademessage = upgrademessage | 136 self.upgrademessage = upgrademessage |
137 | 137 |
138 for k, v in kwargs.items(): | 138 for k, v in kwargs.items(): |
139 setattr(self, k, v) | 139 setattr(self, k, v) |
140 | 140 |
141 def upgradefindimprovements(repo): | 141 def findimprovements(repo): |
142 """Determine improvements that can be made to the repo during upgrade. | 142 """Determine improvements that can be made to the repo during upgrade. |
143 | 143 |
144 Returns a list of ``upgradeimprovement`` describing repository deficiencies | 144 Returns a list of ``upgradeimprovement`` describing repository deficiencies |
145 and optimizations. | 145 and optimizations. |
146 """ | 146 """ |
624 raise error.Abort(_('cannot upgrade repository; do not support ' | 624 raise error.Abort(_('cannot upgrade repository; do not support ' |
625 'destination requirement: %s') % | 625 'destination requirement: %s') % |
626 _(', ').join(sorted(unsupportedreqs))) | 626 _(', ').join(sorted(unsupportedreqs))) |
627 | 627 |
628 # Find and validate all improvements that can be made. | 628 # Find and validate all improvements that can be made. |
629 improvements = upgradefindimprovements(repo) | 629 improvements = findimprovements(repo) |
630 for i in improvements: | 630 for i in improvements: |
631 if i.type not in (deficiency, optimisation): | 631 if i.type not in (deficiency, optimisation): |
632 raise error.Abort(_('unexpected improvement type %s for %s') % ( | 632 raise error.Abort(_('unexpected improvement type %s for %s') % ( |
633 i.type, i.name)) | 633 i.type, i.name)) |
634 | 634 |