D9469: upgrade: display the list of processed revlog before proceeding
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Mon Nov 30 15:44:04 UTC 2020
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This help to make sure we don't wrongly skip some in the test and to make sure
the user is aware of the amount of processing they is signing up for.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9469
AFFECTED FILES
mercurial/upgrade.py
tests/test-copies-chain-merge.t
tests/test-lfs-serve.t
tests/test-persistent-nodemap.t
tests/test-share-safe.t
tests/test-upgrade-repo.t
CHANGE DETAILS
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
@@ -169,6 +169,11 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
additional optimizations are available by specifying "--optimize <name>":
re-delta-parent
@@ -188,6 +193,11 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
--optimize can be used to add optimizations
@@ -203,6 +213,11 @@
re-delta-parent
deltas within internal storage will choose a new base revision if needed
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
additional optimizations are available by specifying "--optimize <name>":
re-delta-multibase
@@ -229,6 +244,11 @@
re-delta-parent
deltas within internal storage will choose a new base revision if needed
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
additional optimizations are available by specifying "--optimize <name>":
re-delta-multibase
@@ -246,6 +266,11 @@
optimisations: re-delta-parent
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
unknown optimization:
@@ -343,6 +368,11 @@
sparserevlog
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.
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
additional optimizations are available by specifying "--optimize <name>":
re-delta-parent
@@ -362,6 +392,11 @@
preserved: revlogv1, store
added: dotencode, fncache, generaldelta, sparserevlog
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg --config format.dotencode=false debugupgraderepo
repository lacks features recommended by current config options:
@@ -396,6 +431,11 @@
sparserevlog
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.
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
additional optimizations are available by specifying "--optimize <name>":
re-delta-parent
@@ -422,6 +462,11 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
@@ -473,6 +518,11 @@
generaldelta
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
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -569,6 +619,11 @@
sparserevlog
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.
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -608,6 +663,9 @@
re-delta-parent
deltas within internal storage will choose a new base revision if needed
+ processed revlogs:
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -684,6 +742,10 @@
re-delta-parent
deltas within internal storage will choose a new base revision if needed
+ processed revlogs:
+ - all-filelogs
+ - changelog
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -732,6 +794,9 @@
re-delta-parent
deltas within internal storage will choose a new base revision if needed
+ processed revlogs:
+ - changelog
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -780,6 +845,9 @@
re-delta-parent
deltas within internal storage will choose a new base revision if needed
+ processed revlogs:
+ - all-filelogs
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -833,6 +901,11 @@
re-delta-parent
deltas within internal storage will choose a new base revision if needed
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -887,6 +960,11 @@
re-delta-parent
deltas within internal storage will choose a new base revision if needed
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -938,6 +1016,11 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
@@ -974,6 +1057,11 @@
re-delta-fulladd
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
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
@@ -1035,6 +1123,11 @@
requirements
preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, sparserevlog, store
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
@@ -1088,6 +1181,11 @@
requirements
preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, sparserevlog, store
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
@@ -1188,6 +1286,11 @@
re-delta-all
deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
beginning upgrade...
repository locked and read-only
creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
@@ -1247,6 +1350,11 @@
preserved: dotencode, fncache, generaldelta, revlogv1, store
added: sparserevlog
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ cat .hg/requires
dotencode
fncache
@@ -1263,6 +1371,11 @@
preserved: dotencode, fncache, generaldelta, revlogv1, store
removed: sparserevlog
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ cat .hg/requires
dotencode
fncache
@@ -1284,6 +1397,11 @@
preserved: dotencode, fncache, generaldelta, revlogv1, store
added: revlog-compression-zstd, sparserevlog
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg debugformat -v
format-variant repo config default
fncache: yes yes yes
@@ -1314,6 +1432,11 @@
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
removed: revlog-compression-zstd
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg debugformat -v
format-variant repo config default
fncache: yes yes yes
@@ -1347,6 +1470,11 @@
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
added: revlog-compression-zstd
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg debugformat -v
format-variant repo config default
fncache: yes yes yes
@@ -1384,6 +1512,11 @@
added: exp-sidedata-flag (zstd !)
added: exp-sidedata-flag, sparserevlog (no-zstd !)
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg debugformat -v
format-variant repo config default
fncache: yes yes yes
@@ -1421,6 +1554,11 @@
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, sparserevlog, store (zstd !)
removed: exp-sidedata-flag
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg debugformat -v
format-variant repo config default
fncache: yes yes yes
@@ -1458,6 +1596,11 @@
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, sparserevlog, store (zstd !)
added: exp-sidedata-flag
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg debugformat -v
format-variant repo config default
fncache: yes yes yes
diff --git a/tests/test-share-safe.t b/tests/test-share-safe.t
--- a/tests/test-share-safe.t
+++ b/tests/test-share-safe.t
@@ -215,6 +215,11 @@
preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlogv1, sparserevlog, store
added: revlog-compression-zstd
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg log -r .
changeset: 1:5f6d8a4bf34a
user: test
@@ -237,6 +242,11 @@
preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlog-compression-zstd, revlogv1, sparserevlog, store (zstd !)
added: persistent-nodemap
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ hg log -r .
changeset: 1:5f6d8a4bf34a
user: test
diff --git a/tests/test-persistent-nodemap.t b/tests/test-persistent-nodemap.t
--- a/tests/test-persistent-nodemap.t
+++ b/tests/test-persistent-nodemap.t
@@ -490,6 +490,11 @@
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
removed: persistent-nodemap
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
[1]
$ hg debugnodemap --metadata
@@ -520,6 +525,11 @@
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
added: persistent-nodemap
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
00changelog-*.nd (glob)
00changelog.n
@@ -544,6 +554,11 @@
optimisations: re-delta-all
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
00changelog-*.nd (glob)
00changelog.n
diff --git a/tests/test-lfs-serve.t b/tests/test-lfs-serve.t
--- a/tests/test-lfs-serve.t
+++ b/tests/test-lfs-serve.t
@@ -133,6 +133,11 @@
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
$ grep 'lfs' .hg/requires $SERVER_REQUIRES
[1]
diff --git a/tests/test-copies-chain-merge.t b/tests/test-copies-chain-merge.t
--- a/tests/test-copies-chain-merge.t
+++ b/tests/test-copies-chain-merge.t
@@ -663,6 +663,11 @@
preserved: * (glob)
added: exp-copies-sidedata-changeset, exp-sidedata-flag
+ processed revlogs:
+ - all-filelogs
+ - changelog
+ - manifest
+
#endif
diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -714,9 +714,9 @@
destrepo.svfs.fncache.add(unencodedname[:-2] + b'.d')
-UPGRADE_CHANGELOG = object()
-UPGRADE_MANIFEST = object()
-UPGRADE_FILELOGS = object()
+UPGRADE_CHANGELOG = b"changelog"
+UPGRADE_MANIFEST = b"manifest"
+UPGRADE_FILELOGS = b"all-filelogs"
UPGRADE_ALL_REVLOGS = frozenset(
[UPGRADE_CHANGELOG, UPGRADE_MANIFEST, UPGRADE_FILELOGS]
@@ -1311,6 +1311,15 @@
for a in actions:
ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage))
+ def print_affected_revlogs():
+ if not revlogs:
+ ui.write((b'no revlogs to process\n'))
+ else:
+ ui.write((b'processed revlogs:\n'))
+ for r in sorted(revlogs):
+ ui.write((b' - %s\n' % r))
+ ui.write((b'\n'))
+
if not run:
fromconfig = []
onlydefault = []
@@ -1362,6 +1371,7 @@
printrequirements()
printoptimisations()
printupgradeactions()
+ print_affected_revlogs()
unusedoptimize = [i for i in alloptimizations if i not in actions]
@@ -1381,6 +1391,7 @@
printrequirements()
printoptimisations()
printupgradeactions()
+ print_affected_revlogs()
upgradeactions = [a.name for a in actions]
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list