Mercurial > hg
changeset 31904:3c77f03f16b3
upgrade: simplify the "origin" dispatch in dry run
We could compute the final set we need directly.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 11 Apr 2017 00:03:11 +0200 |
parents | fa1088de2119 |
children | 00f5d27dd553 |
files | mercurial/upgrade.py |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/upgrade.py Mon Apr 10 23:11:45 2017 +0200 +++ b/mercurial/upgrade.py Tue Apr 11 00:03:11 2017 +0200 @@ -664,19 +664,16 @@ ui.write('%s\n %s\n\n' % (a.name, a.upgrademessage)) if not run: - fromdefault = [] fromconfig = [] + onlydefault = [] for d in deficiencies: - if d.fromdefault: - fromdefault.append(d) if d.fromconfig: fromconfig.append(d) + elif d.fromdefault: + onlydefault.append(d) - if fromdefault or fromconfig: - fromconfignames = set(x.name for x in fromconfig) - onlydefault = [i for i in fromdefault - if i.name not in fromconfignames] + if fromconfig or onlydefault: if fromconfig: ui.write(_('repository lacks features recommended by '