diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -92,7 +92,8 @@ def upgraderepo( 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 @@ def upgraderepo( 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: diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t --- a/tests/test-upgrade-repo.t +++ b/tests/test-upgrade-repo.t @@ -401,6 +401,10 @@ Various sub-optimal detections work [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] $ hg debugupgraderepo + note: selecting all-filelogs for processing to change: dotencode + note: selecting all-manifestlogs for processing to change: dotencode + note: selecting changelog for processing to change: dotencode + repository lacks features recommended by current config options: fncache @@ -473,6 +477,10 @@ Various sub-optimal detections work $ hg --config format.dotencode=false debugupgraderepo + note: selecting all-filelogs for processing to change: fncache + note: selecting all-manifestlogs for processing to change: fncache + note: selecting changelog for processing to change: fncache + repository lacks features recommended by current config options: fncache @@ -567,6 +575,10 @@ make sure we have a .d file .hg/store/data/f2.i $ hg debugupgraderepo --run --config format.sparse-revlog=false + note: selecting all-filelogs for processing to change: generaldelta + note: selecting all-manifestlogs for processing to change: generaldelta + note: selecting changelog for processing to change: generaldelta + upgrade will perform the following actions: requirements @@ -671,6 +683,10 @@ unless --no-backup is passed $ rm -rf .hg/upgradebackup.*/ $ hg debugupgraderepo --run --no-backup + note: selecting all-filelogs for processing to change: sparserevlog + note: selecting all-manifestlogs for processing to change: sparserevlog + note: selecting changelog for processing to change: sparserevlog + upgrade will perform the following actions: requirements @@ -961,6 +977,9 @@ Check you can't skip revlog clone during - manifest $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback + note: selecting all-filelogs for processing to change: sparserevlog + note: selecting changelog for processing to change: sparserevlog + ignoring revlogs selection flags, format requirements change: sparserevlog upgrade will perform the following actions: @@ -1016,6 +1035,9 @@ Check you can't skip revlog clone during $ echo "sparse-revlog=yes" >> .hg/hgrc $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback + note: selecting all-filelogs for processing to change: sparserevlog + note: selecting changelog for processing to change: sparserevlog + ignoring revlogs selection flags, format requirements change: sparserevlog upgrade will perform the following actions: