Skip to content
Snippets Groups Projects
Commit 7fe86498e84f authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

repo-upgrade: avoid a crash when multiple optimisation are specified

In Python 3, the type are no longer comparable and this expose the error.
parent 6b04f702c501
No related branches found
No related tags found
2 merge requests!177branching,!174repo-upgrade: avoid a crash when multiple optimisation are specified
......@@ -683,7 +683,11 @@
newactions.append(d)
newactions.extend(o for o in sorted(optimizations) if o not in newactions)
newactions.extend(
o
for o in sorted(optimizations, key=(lambda x: x.name))
if o not in newactions
)
# FUTURE consider adding some optimizations here for certain transitions.
# e.g. adding generaldelta could schedule parent redeltas.
......
......@@ -467,6 +467,7 @@
re-delta-fulladd
every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved.
$ hg debugupgrade --optimize re-delta-parent --quiet
requirements
preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !)
......@@ -480,6 +481,20 @@
- manifest
passing multiple optimization:
$ hg debugupgrade --optimize re-delta-parent --optimize re-delta-multibase --quiet
requirements
preserved: * (glob)
optimisations: re-delta-multibase, re-delta-parent
processed revlogs:
- all-filelogs
- changelog
- manifest
unknown optimization:
$ hg debugupgrade --optimize foobar
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment