##// END OF EJS Templates
upgrade: don't perform anything if nothing to do...
Pulkit Goyal -
r46848:d3113c4c default
parent child Browse files
Show More
@@ -171,6 +171,9 b' def upgraderepo('
171 upgrade_op.print_unused_optimizations()
171 upgrade_op.print_unused_optimizations()
172 return
172 return
173
173
174 if not (upgrade_op.upgrade_actions or upgrade_op.removed_actions):
175 ui.status(_(b'nothing to do\n'))
176 return
174 # Else we're in the run=true case.
177 # Else we're in the run=true case.
175 ui.write(_(b'upgrade will perform the following actions:\n\n'))
178 ui.write(_(b'upgrade will perform the following actions:\n\n'))
176 upgrade_op.print_requirements()
179 upgrade_op.print_requirements()
@@ -128,16 +128,6 b' non-lfs content, and the extension enabl'
128 @@ -0,0 +1,1 @@
128 @@ -0,0 +1,1 @@
129 +non-lfs
129 +non-lfs
130 *** runcommand debugupgraderepo -q --run
130 *** runcommand debugupgraderepo -q --run
131 upgrade will perform the following actions:
132
133 requirements
134 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
135
136 processed revlogs:
137 - all-filelogs
138 - changelog
139 - manifest
140
141
131
142 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
132 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
143 [1]
133 [1]
@@ -471,30 +471,7 b' Upgrading a repository that is already m'
471
471
472 $ hg init modern
472 $ hg init modern
473 $ hg -R modern debugupgraderepo --run
473 $ hg -R modern debugupgraderepo --run
474 upgrade will perform the following actions:
474 nothing to do
475
476 requirements
477 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
478
479 processed revlogs:
480 - all-filelogs
481 - changelog
482 - manifest
483
484 beginning upgrade...
485 repository locked and read-only
486 creating temporary repository to stage upgraded data: $TESTTMP/modern/.hg/upgrade.* (glob)
487 (it is safe to interrupt this process any time before data migration completes)
488 data fully upgraded in a temporary repository
489 marking source repository as being upgraded; clients will be unable to read from repository
490 starting in-place swap of repository data
491 replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
492 replacing store...
493 store replacement complete; repository was inconsistent for *s (glob)
494 finalizing requirements file and making repository readable again
495 removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
496 copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
497 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
498
475
499 Upgrading a repository to generaldelta works
476 Upgrading a repository to generaldelta works
500
477
@@ -1025,41 +1002,7 b" store files with special filenames aren'"
1025 $ touch .hg/store/.XX_special_filename
1002 $ touch .hg/store/.XX_special_filename
1026
1003
1027 $ hg debugupgraderepo --run
1004 $ hg debugupgraderepo --run
1028 upgrade will perform the following actions:
1005 nothing to do
1029
1030 requirements
1031 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
1032
1033 processed revlogs:
1034 - all-filelogs
1035 - changelog
1036 - manifest
1037
1038 beginning upgrade...
1039 repository locked and read-only
1040 creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1041 (it is safe to interrupt this process any time before data migration completes)
1042 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1043 migrating 301 bytes in store; 107 bytes tracked data
1044 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1045 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1046 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1047 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1048 migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data)
1049 finished migrating 1 changelog revisions; change in size: 0 bytes
1050 finished migrating 3 total revisions; total change in store size: 0 bytes
1051 copying .XX_special_filename
1052 copying phaseroots
1053 data fully upgraded in a temporary repository
1054 marking source repository as being upgraded; clients will be unable to read from repository
1055 starting in-place swap of repository data
1056 replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1057 replacing store...
1058 store replacement complete; repository was inconsistent for *s (glob)
1059 finalizing requirements file and making repository readable again
1060 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1061 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
1062 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1063 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
1006 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
1064 upgrade will perform the following actions:
1007 upgrade will perform the following actions:
1065
1008
@@ -1132,40 +1075,7 b' Check upgrading a large file repository'
1132 store
1075 store
1133
1076
1134 $ hg debugupgraderepo --run
1077 $ hg debugupgraderepo --run
1135 upgrade will perform the following actions:
1078 nothing to do
1136
1137 requirements
1138 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, sparserevlog, store
1139
1140 processed revlogs:
1141 - all-filelogs
1142 - changelog
1143 - manifest
1144
1145 beginning upgrade...
1146 repository locked and read-only
1147 creating temporary repository to stage upgraded data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
1148 (it is safe to interrupt this process any time before data migration completes)
1149 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1150 migrating 355 bytes in store; 160 bytes tracked data
1151 migrating 1 filelogs containing 1 revisions (106 bytes in store; 41 bytes tracked data)
1152 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1153 migrating 1 manifests containing 1 revisions (116 bytes in store; 51 bytes tracked data)
1154 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1155 migrating changelog containing 1 revisions (133 bytes in store; 68 bytes tracked data)
1156 finished migrating 1 changelog revisions; change in size: 0 bytes
1157 finished migrating 3 total revisions; total change in store size: 0 bytes
1158 copying phaseroots
1159 data fully upgraded in a temporary repository
1160 marking source repository as being upgraded; clients will be unable to read from repository
1161 starting in-place swap of repository data
1162 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
1163 replacing store...
1164 store replacement complete; repository was inconsistent for *s (glob)
1165 finalizing requirements file and making repository readable again
1166 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
1167 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
1168 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1169 $ cat .hg/requires
1079 $ cat .hg/requires
1170 dotencode
1080 dotencode
1171 fncache
1081 fncache
@@ -1190,41 +1100,7 b' Check upgrading a large file repository'
1190 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1100 .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1191
1101
1192 $ hg debugupgraderepo --run
1102 $ hg debugupgraderepo --run
1193 upgrade will perform the following actions:
1103 nothing to do
1194
1195 requirements
1196 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, sparserevlog, store
1197
1198 processed revlogs:
1199 - all-filelogs
1200 - changelog
1201 - manifest
1202
1203 beginning upgrade...
1204 repository locked and read-only
1205 creating temporary repository to stage upgraded data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
1206 (it is safe to interrupt this process any time before data migration completes)
1207 migrating 6 total revisions (2 in filelogs, 2 in manifests, 2 in changelog)
1208 migrating 801 bytes in store; 467 bytes tracked data
1209 migrating 2 filelogs containing 2 revisions (296 bytes in store; 182 bytes tracked data)
1210 finished migrating 2 filelog revisions across 2 filelogs; change in size: 0 bytes
1211 migrating 1 manifests containing 2 revisions (241 bytes in store; 151 bytes tracked data)
1212 finished migrating 2 manifest revisions across 1 manifests; change in size: 0 bytes
1213 migrating changelog containing 2 revisions (264 bytes in store; 134 bytes tracked data)
1214 finished migrating 2 changelog revisions; change in size: 0 bytes
1215 finished migrating 6 total revisions; total change in store size: 0 bytes
1216 copying phaseroots
1217 copying lfs blob d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f
1218 data fully upgraded in a temporary repository
1219 marking source repository as being upgraded; clients will be unable to read from repository
1220 starting in-place swap of repository data
1221 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
1222 replacing store...
1223 store replacement complete; repository was inconsistent for *s (glob)
1224 finalizing requirements file and making repository readable again
1225 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
1226 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
1227 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
1228
1104
1229 $ grep lfs .hg/requires
1105 $ grep lfs .hg/requires
1230 lfs
1106 lfs
@@ -1646,40 +1522,6 b' upgrade from hgrc'
1646 $ hg debugsidedata -c 0
1522 $ hg debugsidedata -c 0
1647
1523
1648 Demonstrate that nothing to perform upgrade will still run all the way through
1524 Demonstrate that nothing to perform upgrade will still run all the way through
1649 FIXME: this should return early
1650
1525
1651 $ hg debugupgraderepo --run
1526 $ hg debugupgraderepo --run
1652 upgrade will perform the following actions:
1527 nothing to do
1653
1654 requirements
1655 preserved: dotencode, exp-sidedata-flag, fncache, generaldelta, revlog-compression-zstd, revlogv1, sparserevlog, store
1656
1657 processed revlogs:
1658 - all-filelogs
1659 - changelog
1660 - manifest
1661
1662 beginning upgrade...
1663 repository locked and read-only
1664 creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1665 (it is safe to interrupt this process any time before data migration completes)
1666 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
1667 migrating 297 bytes in store; 103 bytes tracked data
1668 migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data)
1669 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
1670 migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data)
1671 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
1672 migrating changelog containing 1 revisions (123 bytes in store; 58 bytes tracked data)
1673 finished migrating 1 changelog revisions; change in size: 0 bytes
1674 finished migrating 3 total revisions; total change in store size: 0 bytes
1675 copying phaseroots
1676 data fully upgraded in a temporary repository
1677 marking source repository as being upgraded; clients will be unable to read from repository
1678 starting in-place swap of repository data
1679 replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
1680 replacing store...
1681 store replacement complete; repository was inconsistent for *s (glob)
1682 finalizing requirements file and making repository readable again
1683 removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob)
1684 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
1685 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
General Comments 0
You need to be logged in to leave comments. Login now