Show More
@@ -99,6 +99,18 b' def upgraderepo(' | |||||
99 | MN = upgrade_engine.UPGRADE_MANIFEST |
|
99 | MN = upgrade_engine.UPGRADE_MANIFEST | |
100 | CL = upgrade_engine.UPGRADE_CHANGELOG |
|
100 | CL = upgrade_engine.UPGRADE_CHANGELOG | |
101 |
|
101 | |||
|
102 | if optimizations: | |||
|
103 | if any(specified_revlogs.values()): | |||
|
104 | # we have some limitation on revlogs to be recloned | |||
|
105 | for rl, enabled in specified_revlogs.items(): | |||
|
106 | if enabled: | |||
|
107 | touched_revlogs.add(rl) | |||
|
108 | else: | |||
|
109 | touched_revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS) | |||
|
110 | for rl, enabled in specified_revlogs.items(): | |||
|
111 | if not enabled: | |||
|
112 | touched_revlogs.discard(rl) | |||
|
113 | ||||
102 | for action in sorted(up_actions + removed_actions, key=lambda a: a.name): |
|
114 | for action in sorted(up_actions + removed_actions, key=lambda a: a.name): | |
103 | # optimisation does not "requires anything, they just needs it. |
|
115 | # optimisation does not "requires anything, they just needs it. | |
104 | if action.type != upgrade_actions.FORMAT_VARIANT: |
|
116 | if action.type != upgrade_actions.FORMAT_VARIANT: | |
@@ -147,22 +159,9 b' def upgraderepo(' | |||||
147 | elif msg_issued >= 1: |
|
159 | elif msg_issued >= 1: | |
148 | ui.status((b"\n")) |
|
160 | ui.status((b"\n")) | |
149 |
|
161 | |||
150 | revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS) |
|
|||
151 | if specified_revlogs: |
|
|||
152 | # we have some limitation on revlogs to be recloned |
|
|||
153 | if any(specified_revlogs.values()): |
|
|||
154 | revlogs = set() |
|
|||
155 | for upgrade, enabled in specified_revlogs.items(): |
|
|||
156 | if enabled: |
|
|||
157 | revlogs.add(upgrade) |
|
|||
158 | else: |
|
|||
159 | # none are enabled |
|
|||
160 | for upgrade in specified_revlogs.keys(): |
|
|||
161 | revlogs.discard(upgrade) |
|
|||
162 |
|
||||
163 | # check the consistency of the revlog selection with the planned action |
|
162 | # check the consistency of the revlog selection with the planned action | |
164 |
|
163 | |||
165 | if revlogs != upgrade_engine.UPGRADE_ALL_REVLOGS: |
|
164 | if touched_revlogs != upgrade_engine.UPGRADE_ALL_REVLOGS: | |
166 | incompatible = upgrade_actions.RECLONES_REQUIREMENTS & ( |
|
165 | incompatible = upgrade_actions.RECLONES_REQUIREMENTS & ( | |
167 | removedreqs | addedreqs |
|
166 | removedreqs | addedreqs | |
168 | ) |
|
167 | ) | |
@@ -172,7 +171,7 b' def upgraderepo(' | |||||
172 | b'change: %s\n' |
|
171 | b'change: %s\n' | |
173 | ) |
|
172 | ) | |
174 | ui.warn(msg % b', '.join(sorted(incompatible))) |
|
173 | ui.warn(msg % b', '.join(sorted(incompatible))) | |
175 | revlogs = upgrade_engine.UPGRADE_ALL_REVLOGS |
|
174 | touched_revlogs = upgrade_engine.UPGRADE_ALL_REVLOGS | |
176 |
|
175 | |||
177 | upgrade_op = upgrade_actions.UpgradeOperation( |
|
176 | upgrade_op = upgrade_actions.UpgradeOperation( | |
178 | ui, |
|
177 | ui, | |
@@ -180,7 +179,7 b' def upgraderepo(' | |||||
180 | repo.requirements, |
|
179 | repo.requirements, | |
181 | up_actions, |
|
180 | up_actions, | |
182 | removed_actions, |
|
181 | removed_actions, | |
183 | revlogs, |
|
182 | touched_revlogs, | |
184 | backup, |
|
183 | backup, | |
185 | ) |
|
184 | ) | |
186 |
|
185 |
@@ -363,10 +363,7 b' Upgrade' | |||||
363 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) |
|
363 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | |
364 | added: share-safe |
|
364 | added: share-safe | |
365 |
|
365 | |||
366 | processed revlogs: |
|
366 | no revlogs to process | |
367 | - all-filelogs |
|
|||
368 | - changelog |
|
|||
369 | - manifest |
|
|||
370 |
|
367 | |||
371 |
$ |
|
368 | $ hg debugupgraderepo --run | |
372 | upgrade will perform the following actions: |
|
369 | upgrade will perform the following actions: | |
@@ -379,10 +376,7 b' Upgrade' | |||||
379 | share-safe |
|
376 | share-safe | |
380 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. |
|
377 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. | |
381 |
|
378 | |||
382 | processed revlogs: |
|
379 | no revlogs to process | |
383 | - all-filelogs |
|
|||
384 | - changelog |
|
|||
385 | - manifest |
|
|||
386 |
|
380 | |||
387 | beginning upgrade... |
|
381 | beginning upgrade... | |
388 | repository locked and read-only |
|
382 | repository locked and read-only | |
@@ -457,10 +451,7 b' Test that downgrading works too' | |||||
457 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) |
|
451 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | |
458 | removed: share-safe |
|
452 | removed: share-safe | |
459 |
|
453 | |||
460 | processed revlogs: |
|
454 | no revlogs to process | |
461 | - all-filelogs |
|
|||
462 | - changelog |
|
|||
463 | - manifest |
|
|||
464 |
|
455 | |||
465 |
$ |
|
456 | $ hg debugupgraderepo --run | |
466 | upgrade will perform the following actions: |
|
457 | upgrade will perform the following actions: | |
@@ -470,10 +461,7 b' Test that downgrading works too' | |||||
470 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) |
|
461 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | |
471 | removed: share-safe |
|
462 | removed: share-safe | |
472 |
|
463 | |||
473 | processed revlogs: |
|
464 | no revlogs to process | |
474 | - all-filelogs |
|
|||
475 | - changelog |
|
|||
476 | - manifest |
|
|||
477 |
|
465 | |||
478 | beginning upgrade... |
|
466 | beginning upgrade... | |
479 | repository locked and read-only |
|
467 | repository locked and read-only | |
@@ -556,10 +544,7 b' Testing automatic upgrade of shares when' | |||||
556 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) |
|
544 | preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | |
557 | added: share-safe |
|
545 | added: share-safe | |
558 |
|
546 | |||
559 | processed revlogs: |
|
547 | no revlogs to process | |
560 | - all-filelogs |
|
|||
561 | - changelog |
|
|||
562 | - manifest |
|
|||
563 |
|
548 | |||
564 | repository upgraded to share safe mode, existing shares will still work in old non-safe mode. Re-share existing shares to use them in safe mode New shares will be created in safe mode. |
|
549 | repository upgraded to share safe mode, existing shares will still work in old non-safe mode. Re-share existing shares to use them in safe mode New shares will be created in safe mode. | |
565 | $ hg debugrequirements |
|
550 | $ hg debugrequirements |
@@ -213,10 +213,7 b' An upgrade of a repository created with ' | |||||
213 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
213 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) | |
214 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
214 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) | |
215 |
|
215 | |||
216 | processed revlogs: |
|
216 | no revlogs to process | |
217 | - all-filelogs |
|
|||
218 | - changelog |
|
|||
219 | - manifest |
|
|||
220 |
|
217 | |||
221 | additional optimizations are available by specifying "--optimize <name>": |
|
218 | additional optimizations are available by specifying "--optimize <name>": | |
222 |
|
219 | |||
@@ -238,10 +235,7 b' An upgrade of a repository created with ' | |||||
238 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
235 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) | |
239 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
236 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) | |
240 |
|
237 | |||
241 | processed revlogs: |
|
238 | no revlogs to process | |
242 | - all-filelogs |
|
|||
243 | - changelog |
|
|||
244 | - manifest |
|
|||
245 |
|
239 | |||
246 |
|
240 | |||
247 | --optimize can be used to add optimizations |
|
241 | --optimize can be used to add optimizations | |
@@ -963,7 +957,6 b" Check you can't skip revlog clone during" | |||||
963 | $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet |
|
957 | $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet | |
964 | warning: ignoring --no-manifest, as upgrade is changing: sparserevlog |
|
958 | warning: ignoring --no-manifest, as upgrade is changing: sparserevlog | |
965 |
|
959 | |||
966 | ignoring revlogs selection flags, format requirements change: sparserevlog |
|
|||
967 | requirements |
|
960 | requirements | |
968 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) |
|
961 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) | |
969 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) |
|
962 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) | |
@@ -980,7 +973,6 b" Check you can't skip revlog clone during" | |||||
980 | note: selecting all-filelogs for processing to change: sparserevlog |
|
973 | note: selecting all-filelogs for processing to change: sparserevlog | |
981 | note: selecting changelog for processing to change: sparserevlog |
|
974 | note: selecting changelog for processing to change: sparserevlog | |
982 |
|
975 | |||
983 | ignoring revlogs selection flags, format requirements change: sparserevlog |
|
|||
984 | upgrade will perform the following actions: |
|
976 | upgrade will perform the following actions: | |
985 |
|
977 | |||
986 | requirements |
|
978 | requirements | |
@@ -1038,7 +1030,6 b" Check you can't skip revlog clone during" | |||||
1038 | note: selecting all-filelogs for processing to change: sparserevlog |
|
1030 | note: selecting all-filelogs for processing to change: sparserevlog | |
1039 | note: selecting changelog for processing to change: sparserevlog |
|
1031 | note: selecting changelog for processing to change: sparserevlog | |
1040 |
|
1032 | |||
1041 | ignoring revlogs selection flags, format requirements change: sparserevlog |
|
|||
1042 | upgrade will perform the following actions: |
|
1033 | upgrade will perform the following actions: | |
1043 |
|
1034 | |||
1044 | requirements |
|
1035 | requirements | |
@@ -1695,10 +1686,7 b' Upgrade to dirstate-v2' | |||||
1695 | dirstate-v2 |
|
1686 | dirstate-v2 | |
1696 | "hg status" will be faster |
|
1687 | "hg status" will be faster | |
1697 |
|
1688 | |||
1698 | processed revlogs: |
|
1689 | no revlogs to process | |
1699 | - all-filelogs |
|
|||
1700 | - changelog |
|
|||
1701 | - manifest |
|
|||
1702 |
|
1690 | |||
1703 | beginning upgrade... |
|
1691 | beginning upgrade... | |
1704 | repository locked and read-only |
|
1692 | repository locked and read-only | |
@@ -1724,10 +1712,7 b' Downgrade from dirstate-v2' | |||||
1724 | preserved: * (glob) |
|
1712 | preserved: * (glob) | |
1725 | removed: dirstate-v2 |
|
1713 | removed: dirstate-v2 | |
1726 |
|
1714 | |||
1727 | processed revlogs: |
|
1715 | no revlogs to process | |
1728 | - all-filelogs |
|
|||
1729 | - changelog |
|
|||
1730 | - manifest |
|
|||
1731 |
|
1716 | |||
1732 | beginning upgrade... |
|
1717 | beginning upgrade... | |
1733 | repository locked and read-only |
|
1718 | repository locked and read-only | |
@@ -1762,10 +1747,7 b' upgrade' | |||||
1762 | dirstate-v2 |
|
1747 | dirstate-v2 | |
1763 | "hg status" will be faster |
|
1748 | "hg status" will be faster | |
1764 |
|
1749 | |||
1765 | processed revlogs: |
|
1750 | no revlogs to process | |
1766 | - all-filelogs |
|
|||
1767 | - changelog |
|
|||
1768 | - manifest |
|
|||
1769 |
|
1751 | |||
1770 | beginning upgrade... |
|
1752 | beginning upgrade... | |
1771 | repository locked and read-only |
|
1753 | repository locked and read-only | |
@@ -1786,10 +1768,7 b' downgrade' | |||||
1786 | preserved: * (glob) |
|
1768 | preserved: * (glob) | |
1787 | removed: dirstate-v2 |
|
1769 | removed: dirstate-v2 | |
1788 |
|
1770 | |||
1789 | processed revlogs: |
|
1771 | no revlogs to process | |
1790 | - all-filelogs |
|
|||
1791 | - changelog |
|
|||
1792 | - manifest |
|
|||
1793 |
|
1772 | |||
1794 | beginning upgrade... |
|
1773 | beginning upgrade... | |
1795 | repository locked and read-only |
|
1774 | repository locked and read-only |
General Comments 0
You need to be logged in to leave comments.
Login now