##// END OF EJS Templates
upgrade: issue a message when a revlog type has to be upgraded...
marmoute -
r49276:8405c1bf default
parent child Browse files
Show More
@@ -92,7 +92,8 b' def upgraderepo('
92
92
93 touched_revlogs = set()
93 touched_revlogs = set()
94 overwrite_msg = _(b'warning: ignoring %14s, as upgrade is changing: %s\n')
94 overwrite_msg = _(b'warning: ignoring %14s, as upgrade is changing: %s\n')
95 msg_issued = False
95 select_msg = _(b'note: selecting %s for processing to change: %s\n')
96 msg_issued = 0
96
97
97 FL = upgrade_engine.UPGRADE_FILELOGS
98 FL = upgrade_engine.UPGRADE_FILELOGS
98 MN = upgrade_engine.UPGRADE_MANIFEST
99 MN = upgrade_engine.UPGRADE_MANIFEST
@@ -108,24 +109,43 b' def upgraderepo('
108 if not specified_revlogs[FL]:
109 if not specified_revlogs[FL]:
109 msg = overwrite_msg % (b'--no-filelogs', action.name)
110 msg = overwrite_msg % (b'--no-filelogs', action.name)
110 ui.warn(msg)
111 ui.warn(msg)
111 msg_issued = True
112 msg_issued = 2
113 else:
114 msg = select_msg % (b'all-filelogs', action.name)
115 ui.status(msg)
116 if not ui.quiet:
117 msg_issued = 1
112 touched_revlogs.add(FL)
118 touched_revlogs.add(FL)
119
113 if action.touches_manifests and MN not in touched_revlogs:
120 if action.touches_manifests and MN not in touched_revlogs:
114 if MN in specified_revlogs:
121 if MN in specified_revlogs:
115 if not specified_revlogs[MN]:
122 if not specified_revlogs[MN]:
116 msg = overwrite_msg % (b'--no-manifest', action.name)
123 msg = overwrite_msg % (b'--no-manifest', action.name)
117 ui.warn(msg)
124 ui.warn(msg)
118 msg_issued = True
125 msg_issued = 2
126 else:
127 msg = select_msg % (b'all-manifestlogs', action.name)
128 ui.status(msg)
129 if not ui.quiet:
130 msg_issued = 1
119 touched_revlogs.add(MN)
131 touched_revlogs.add(MN)
132
120 if action.touches_changelog and CL not in touched_revlogs:
133 if action.touches_changelog and CL not in touched_revlogs:
121 if CL in specified_revlogs:
134 if CL in specified_revlogs:
122 if not specified_revlogs[CL]:
135 if not specified_revlogs[CL]:
123 msg = overwrite_msg % (b'--no-changelog', action.name)
136 msg = overwrite_msg % (b'--no-changelog', action.name)
124 ui.warn(msg)
137 ui.warn(msg)
125 msg_issued = True
138 msg_issued = True
139 else:
140 msg = select_msg % (b'changelog', action.name)
141 ui.status(msg)
142 if not ui.quiet:
143 msg_issued = 1
126 touched_revlogs.add(CL)
144 touched_revlogs.add(CL)
127 if msg_issued:
145 if msg_issued >= 2:
128 ui.warn((b"\n"))
146 ui.warn((b"\n"))
147 elif msg_issued >= 1:
148 ui.status((b"\n"))
129
149
130 revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS)
150 revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS)
131 if specified_revlogs:
151 if specified_revlogs:
@@ -401,6 +401,10 b' Various sub-optimal detections work'
401 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
401 [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !)
402 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
402 [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
403 $ hg debugupgraderepo
403 $ hg debugupgraderepo
404 note: selecting all-filelogs for processing to change: dotencode
405 note: selecting all-manifestlogs for processing to change: dotencode
406 note: selecting changelog for processing to change: dotencode
407
404 repository lacks features recommended by current config options:
408 repository lacks features recommended by current config options:
405
409
406 fncache
410 fncache
@@ -473,6 +477,10 b' Various sub-optimal detections work'
473
477
474
478
475 $ hg --config format.dotencode=false debugupgraderepo
479 $ hg --config format.dotencode=false debugupgraderepo
480 note: selecting all-filelogs for processing to change: fncache
481 note: selecting all-manifestlogs for processing to change: fncache
482 note: selecting changelog for processing to change: fncache
483
476 repository lacks features recommended by current config options:
484 repository lacks features recommended by current config options:
477
485
478 fncache
486 fncache
@@ -567,6 +575,10 b' make sure we have a .d file'
567 .hg/store/data/f2.i
575 .hg/store/data/f2.i
568
576
569 $ hg debugupgraderepo --run --config format.sparse-revlog=false
577 $ hg debugupgraderepo --run --config format.sparse-revlog=false
578 note: selecting all-filelogs for processing to change: generaldelta
579 note: selecting all-manifestlogs for processing to change: generaldelta
580 note: selecting changelog for processing to change: generaldelta
581
570 upgrade will perform the following actions:
582 upgrade will perform the following actions:
571
583
572 requirements
584 requirements
@@ -671,6 +683,10 b' unless --no-backup is passed'
671
683
672 $ rm -rf .hg/upgradebackup.*/
684 $ rm -rf .hg/upgradebackup.*/
673 $ hg debugupgraderepo --run --no-backup
685 $ hg debugupgraderepo --run --no-backup
686 note: selecting all-filelogs for processing to change: sparserevlog
687 note: selecting all-manifestlogs for processing to change: sparserevlog
688 note: selecting changelog for processing to change: sparserevlog
689
674 upgrade will perform the following actions:
690 upgrade will perform the following actions:
675
691
676 requirements
692 requirements
@@ -961,6 +977,9 b" Check you can't skip revlog clone during"
961 - manifest
977 - manifest
962
978
963 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
979 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
980 note: selecting all-filelogs for processing to change: sparserevlog
981 note: selecting changelog for processing to change: sparserevlog
982
964 ignoring revlogs selection flags, format requirements change: sparserevlog
983 ignoring revlogs selection flags, format requirements change: sparserevlog
965 upgrade will perform the following actions:
984 upgrade will perform the following actions:
966
985
@@ -1016,6 +1035,9 b" Check you can't skip revlog clone during"
1016
1035
1017 $ echo "sparse-revlog=yes" >> .hg/hgrc
1036 $ echo "sparse-revlog=yes" >> .hg/hgrc
1018 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
1037 $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback
1038 note: selecting all-filelogs for processing to change: sparserevlog
1039 note: selecting changelog for processing to change: sparserevlog
1040
1019 ignoring revlogs selection flags, format requirements change: sparserevlog
1041 ignoring revlogs selection flags, format requirements change: sparserevlog
1020 upgrade will perform the following actions:
1042 upgrade will perform the following actions:
1021
1043
General Comments 0
You need to be logged in to leave comments. Login now