upgrade: simplify some of the initial dispatch for dry run
Since we already have the list of deficiencies, we can use it directly.
--- a/mercurial/upgrade.py Fri Apr 07 18:39:27 2017 +0200
+++ b/mercurial/upgrade.py Mon Apr 10 22:15:17 2017 +0200
@@ -664,17 +664,12 @@
if not run:
fromdefault = []
fromconfig = []
- optimizations = []
- for i in improvements:
- assert i.type in (deficiency, optimisation)
- if i.type == deficiency:
- if i.fromdefault:
- fromdefault.append(i)
- if i.fromconfig:
- fromconfig.append(i)
- else:
- optimizations.append(i)
+ for d in deficiencies:
+ if d.fromdefault:
+ fromdefault.append(d)
+ if d.fromconfig:
+ fromconfig.append(d)
if fromdefault or fromconfig:
fromconfignames = set(x.name for x in fromconfig)