##// END OF EJS Templates
upgrade: drop support for old style optimization names...
Pulkit Goyal -
r46825:083438d6 default
parent child Browse files
Show More
@@ -3933,7 +3933,7 b' def debugupgraderepo(ui, repo, run=False'
3933 * `--no-changelog --no-manifest --no-filelogs`: skip all filelog optimisation
3933 * `--no-changelog --no-manifest --no-filelogs`: skip all filelog optimisation
3934 """
3934 """
3935 return upgrade.upgraderepo(
3935 return upgrade.upgraderepo(
3936 ui, repo, run=run, optimize=optimize, backup=backup, **opts
3936 ui, repo, run=run, optimize=set(optimize), backup=backup, **opts
3937 )
3937 )
3938
3938
3939
3939
@@ -22,19 +22,6 b' from .upgrade_utils import ('
22
22
23 allformatvariant = upgrade_actions.allformatvariant
23 allformatvariant = upgrade_actions.allformatvariant
24
24
25 # search without '-' to support older form on newer client.
26 #
27 # We don't enforce backward compatibility for debug command so this
28 # might eventually be dropped. However, having to use two different
29 # forms in script when comparing result is anoying enough to add
30 # backward compatibility for a while.
31 legacy_opts_map = {
32 b'redeltaparent': b're-delta-parent',
33 b'redeltamultibase': b're-delta-multibase',
34 b'redeltaall': b're-delta-all',
35 b'redeltafulladd': b're-delta-fulladd',
36 }
37
38
25
39 def upgraderepo(
26 def upgraderepo(
40 ui,
27 ui,
@@ -48,8 +35,7 b' def upgraderepo('
48 ):
35 ):
49 """Upgrade a repository in place."""
36 """Upgrade a repository in place."""
50 if optimize is None:
37 if optimize is None:
51 optimize = []
38 optimize = {}
52 optimize = {legacy_opts_map.get(o, o) for o in optimize}
53 repo = repo.unfiltered()
39 repo = repo.unfiltered()
54
40
55 revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS)
41 revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS)
@@ -211,7 +211,7 b' An upgrade of a repository created with '
211
211
212 --optimize can be used to add optimizations
212 --optimize can be used to add optimizations
213
213
214 $ hg debugupgrade --optimize redeltaparent
214 $ hg debugupgrade --optimize 're-delta-parent'
215 (no format upgrades found in existing repository)
215 (no format upgrades found in existing repository)
216 performing an upgrade with "--run" will make the following changes:
216 performing an upgrade with "--run" will make the following changes:
217
217
@@ -1060,7 +1060,7 b" store files with special filenames aren'"
1060 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1060 removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
1061 copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (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
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 redeltafulladd
1063 $ hg debugupgraderepo --run --optimize 're-delta-fulladd'
1064 upgrade will perform the following actions:
1064 upgrade will perform the following actions:
1065
1065
1066 requirements
1066 requirements
@@ -1289,7 +1289,7 b' repository config is taken in account'
1289 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1289 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
1290 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1290 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
1291
1291
1292 $ hg debugupgraderepo --run --optimize redeltaall
1292 $ hg debugupgraderepo --run --optimize 're-delta-all'
1293 upgrade will perform the following actions:
1293 upgrade will perform the following actions:
1294
1294
1295 requirements
1295 requirements
General Comments 0
You need to be logged in to leave comments. Login now