Mercurial > public > mercurial-scm > hg-stable
diff mercurial/upgrade.py @ 48486:8405c1bffacf
upgrade: issue a message when a revlog type has to be upgraded
This is more explicite and prepare for a smoother transition to smarter picking
of the revlog we will process.
Differential Revision: https://phab.mercurial-scm.org/D11870
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 06 Dec 2021 17:13:26 +0100 |
parents | 1d0978cfe968 |
children | 62e6222cc5b6 |
line wrap: on
line diff
--- a/mercurial/upgrade.py Mon Dec 06 17:12:21 2021 +0100 +++ b/mercurial/upgrade.py Mon Dec 06 17:13:26 2021 +0100 @@ -92,7 +92,8 @@ touched_revlogs = set() overwrite_msg = _(b'warning: ignoring %14s, as upgrade is changing: %s\n') - msg_issued = False + select_msg = _(b'note: selecting %s for processing to change: %s\n') + msg_issued = 0 FL = upgrade_engine.UPGRADE_FILELOGS MN = upgrade_engine.UPGRADE_MANIFEST @@ -108,24 +109,43 @@ if not specified_revlogs[FL]: msg = overwrite_msg % (b'--no-filelogs', action.name) ui.warn(msg) - msg_issued = True + msg_issued = 2 + else: + msg = select_msg % (b'all-filelogs', action.name) + ui.status(msg) + if not ui.quiet: + msg_issued = 1 touched_revlogs.add(FL) + if action.touches_manifests and MN not in touched_revlogs: if MN in specified_revlogs: if not specified_revlogs[MN]: msg = overwrite_msg % (b'--no-manifest', action.name) ui.warn(msg) - msg_issued = True + msg_issued = 2 + else: + msg = select_msg % (b'all-manifestlogs', action.name) + ui.status(msg) + if not ui.quiet: + msg_issued = 1 touched_revlogs.add(MN) + if action.touches_changelog and CL not in touched_revlogs: if CL in specified_revlogs: if not specified_revlogs[CL]: msg = overwrite_msg % (b'--no-changelog', action.name) ui.warn(msg) msg_issued = True + else: + msg = select_msg % (b'changelog', action.name) + ui.status(msg) + if not ui.quiet: + msg_issued = 1 touched_revlogs.add(CL) - if msg_issued: + if msg_issued >= 2: ui.warn((b"\n")) + elif msg_issued >= 1: + ui.status((b"\n")) revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS) if specified_revlogs: