##// END OF EJS Templates
upgrade: enable adding or removing sparse-revlog requirement
Paul Morelle -
r38742:d12415b8 default
parent child Browse files
Show More
@@ -61,7 +61,9 b' def supportremovedrequirements(repo):'
61 the dropped requirement must appear in the returned set for the upgrade
61 the dropped requirement must appear in the returned set for the upgrade
62 to be allowed.
62 to be allowed.
63 """
63 """
64 return set()
64 return {
65 localrepo.SPARSEREVLOG_REQUIREMENT,
66 }
65
67
66 def supporteddestrequirements(repo):
68 def supporteddestrequirements(repo):
67 """Obtain requirements that upgrade supports in the destination.
69 """Obtain requirements that upgrade supports in the destination.
@@ -77,6 +79,7 b' def supporteddestrequirements(repo):'
77 'generaldelta',
79 'generaldelta',
78 'revlogv1',
80 'revlogv1',
79 'store',
81 'store',
82 localrepo.SPARSEREVLOG_REQUIREMENT,
80 }
83 }
81
84
82 def allowednewrequirements(repo):
85 def allowednewrequirements(repo):
@@ -93,6 +96,7 b' def allowednewrequirements(repo):'
93 'dotencode',
96 'dotencode',
94 'fncache',
97 'fncache',
95 'generaldelta',
98 'generaldelta',
99 localrepo.SPARSEREVLOG_REQUIREMENT,
96 }
100 }
97
101
98 def preservedrequirements(repo):
102 def preservedrequirements(repo):
@@ -129,9 +129,6 b' An upgrade of a repository created with '
129 requirements
129 requirements
130 preserved: dotencode, fncache, generaldelta, revlogv1, store
130 preserved: dotencode, fncache, generaldelta, revlogv1, store
131
131
132 sparserevlog
133 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
134
135 additional optimizations are available by specifying "--optimize <name>":
132 additional optimizations are available by specifying "--optimize <name>":
136
133
137 redeltaparent
134 redeltaparent
@@ -156,9 +153,6 b' An upgrade of a repository created with '
156 requirements
153 requirements
157 preserved: dotencode, fncache, generaldelta, revlogv1, store
154 preserved: dotencode, fncache, generaldelta, revlogv1, store
158
155
159 sparserevlog
160 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
161
162 redeltaparent
156 redeltaparent
163 deltas within internal storage will choose a new base revision if needed
157 deltas within internal storage will choose a new base revision if needed
164
158
@@ -241,9 +235,6 b' Various sub-optimal detections work'
241 generaldelta
235 generaldelta
242 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
236 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
243
237
244 sparserevlog
245 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
246
247 additional optimizations are available by specifying "--optimize <name>":
238 additional optimizations are available by specifying "--optimize <name>":
248
239
249 redeltaparent
240 redeltaparent
@@ -286,9 +277,6 b' Various sub-optimal detections work'
286 generaldelta
277 generaldelta
287 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
278 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
288
279
289 sparserevlog
290 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
291
292 additional optimizations are available by specifying "--optimize <name>":
280 additional optimizations are available by specifying "--optimize <name>":
293
281
294 redeltaparent
282 redeltaparent
@@ -315,9 +303,6 b' Upgrading a repository that is already m'
315 requirements
303 requirements
316 preserved: dotencode, fncache, generaldelta, revlogv1, store
304 preserved: dotencode, fncache, generaldelta, revlogv1, store
317
305
318 sparserevlog
319 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
320
321 beginning upgrade...
306 beginning upgrade...
322 repository locked and read-only
307 repository locked and read-only
323 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
308 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
@@ -355,9 +340,6 b' Upgrading a repository to generaldelta w'
355 generaldelta
340 generaldelta
356 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
341 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
357
342
358 sparserevlog
359 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
360
361 beginning upgrade...
343 beginning upgrade...
362 repository locked and read-only
344 repository locked and read-only
363 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
345 creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -455,9 +437,6 b" store files with special filenames aren'"
455 requirements
437 requirements
456 preserved: dotencode, fncache, generaldelta, revlogv1, store
438 preserved: dotencode, fncache, generaldelta, revlogv1, store
457
439
458 sparserevlog
459 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
460
461 beginning upgrade...
440 beginning upgrade...
462 repository locked and read-only
441 repository locked and read-only
463 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
442 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
@@ -489,9 +468,6 b" store files with special filenames aren'"
489 requirements
468 requirements
490 preserved: dotencode, fncache, generaldelta, revlogv1, store
469 preserved: dotencode, fncache, generaldelta, revlogv1, store
491
470
492 sparserevlog
493 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
494
495 redeltafulladd
471 redeltafulladd
496 each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it
472 each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it
497
473
@@ -550,9 +526,6 b' Check upgrading a large file repository'
550 requirements
526 requirements
551 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
527 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
552
528
553 sparserevlog
554 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
555
556 beginning upgrade...
529 beginning upgrade...
557 repository locked and read-only
530 repository locked and read-only
558 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
531 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
@@ -605,9 +578,6 b' Check upgrading a large file repository'
605 requirements
578 requirements
606 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store
579 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store
607
580
608 sparserevlog
609 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
610
611 beginning upgrade...
581 beginning upgrade...
612 repository locked and read-only
582 repository locked and read-only
613 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
583 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
@@ -703,9 +673,6 b' repository config is taken in account'
703 requirements
673 requirements
704 preserved: dotencode, fncache, generaldelta, revlogv1, store
674 preserved: dotencode, fncache, generaldelta, revlogv1, store
705
675
706 sparserevlog
707 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
708
709 redeltaall
676 redeltaall
710 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
677 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
711
678
@@ -744,3 +711,42 b' repository config is taken in account'
744 > [format]
711 > [format]
745 > maxchainlen = 9001
712 > maxchainlen = 9001
746 > EOF
713 > EOF
714
715 Check upgrading a sparse-revlog repository
716 ---------------------------------------
717
718 $ hg init sparserevlogrepo
719 $ cd sparserevlogrepo
720 $ touch foo
721 $ hg add foo
722 $ hg -q commit -m "foo"
723 $ cat .hg/requires
724 dotencode
725 fncache
726 generaldelta
727 revlogv1
728 store
729
730 Check that we can add the sparse-revlog format requirement
731 $ hg --config format.sparse-revlog=yes debugupgraderepo --run >/dev/null
732 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
733 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
734 $ cat .hg/requires
735 dotencode
736 fncache
737 generaldelta
738 revlogv1
739 sparserevlog
740 store
741
742 Check that we can remove the sparse-revlog format requirement
743 $ hg --config format.sparse-revlog=no debugupgraderepo --run >/dev/null
744 copy of old repository backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob)
745 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
746 $ cat .hg/requires
747 dotencode
748 fncache
749 generaldelta
750 revlogv1
751 store
752 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now