Mercurial > hg-stable
changeset 31898:9db45228da52
upgrade: directly iterate over optimisations
Since we already have the list of optimisations independent from the
deficiencies, we can use it directly.
(we make a dual assignement in this changeset to simplify the next one)
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 07 Apr 2017 18:46:27 +0200 |
parents | d0067250542d |
children | cccd8e1538b0 |
files | mercurial/upgrade.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/upgrade.py Mon Apr 10 21:01:06 2017 +0200 +++ b/mercurial/upgrade.py Fri Apr 07 18:46:27 2017 +0200 @@ -621,7 +621,7 @@ _(', ').join(sorted(unsupportedreqs))) # Find and validate all improvements that can be made. - optimizations = findoptimizations(repo) + alloptimizations = optimizations = findoptimizations(repo) # Validate arguments. unknownoptimize = optimize - set(i.name for i in optimizations) @@ -701,8 +701,8 @@ printrequirements() printupgradeactions() - unusedoptimize = [i for i in improvements - if i.name not in actions and i.type == optimisation] + unusedoptimize = [i for i in alloptimizations + if i.name not in actions] if unusedoptimize: ui.write(_('additional optimizations are available by specifying ' '"--optimize <name>":\n\n'))