Mercurial > public > mercurial-scm > hg-stable
diff mercurial/upgrade.py @ 46188:945b33a7edfd
upgrade: move `print_affected_revlogs()` to UpgradeOperation class
Part of refactor where we make things more arranged and integrated into single
`UpgradeOperation` class.
Differential Revision: https://phab.mercurial-scm.org/D9574
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 12 Dec 2020 17:51:27 +0530 |
parents | c407513a44a3 |
children | dfddcbb0c244 |
line wrap: on
line diff
--- a/mercurial/upgrade.py Tue Dec 29 10:53:45 2020 +0100 +++ b/mercurial/upgrade.py Sat Dec 12 17:51:27 2020 +0530 @@ -167,16 +167,8 @@ for a in actions: ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage)) - def print_affected_revlogs(): - if not revlogs: - ui.write((b'no revlogs to process\n')) - else: - ui.write((b'processed revlogs:\n')) - for r in sorted(revlogs): - ui.write((b' - %s\n' % r)) - ui.write((b'\n')) - upgrade_op = upgrade_actions.UpgradeOperation( + ui, newreqs, [a.name for a in actions], revlogs, @@ -233,7 +225,7 @@ printrequirements() printoptimisations() printupgradeactions() - print_affected_revlogs() + upgrade_op.print_affected_revlogs() unusedoptimize = [i for i in alloptimizations if i not in actions] @@ -253,7 +245,7 @@ printrequirements() printoptimisations() printupgradeactions() - print_affected_revlogs() + upgrade_op.print_affected_revlogs() ui.status(_(b'beginning upgrade...\n')) with repo.wlock(), repo.lock():