Show More
@@ -12,6 +12,7 b' from .. import (' | |||
|
12 | 12 | error, |
|
13 | 13 | localrepo, |
|
14 | 14 | requirements, |
|
15 | revlog, | |
|
15 | 16 | util, |
|
16 | 17 | ) |
|
17 | 18 | |
@@ -646,6 +647,17 b' class UpgradeOperation(object):' | |||
|
646 | 647 | i for i in all_optimizations if i not in self.upgrade_actions |
|
647 | 648 | ] |
|
648 | 649 | |
|
650 | # delta reuse mode of this upgrade operation | |
|
651 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEALWAYS | |
|
652 | if b're-delta-all' in self._upgrade_actions_names: | |
|
653 | self.delta_reuse_mode = revlog.revlog.DELTAREUSENEVER | |
|
654 | elif b're-delta-parent' in self._upgrade_actions_names: | |
|
655 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS | |
|
656 | elif b're-delta-multibase' in self._upgrade_actions_names: | |
|
657 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS | |
|
658 | elif b're-delta-fulladd' in self._upgrade_actions_names: | |
|
659 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEFULLADD | |
|
660 | ||
|
649 | 661 | def _write_labeled(self, l, label): |
|
650 | 662 | """ |
|
651 | 663 | Utility function to aid writing of a list under one label |
@@ -446,24 +446,13 b' def upgrade(ui, srcrepo, dstrepo, upgrad' | |||
|
446 | 446 | ) |
|
447 | 447 | ) |
|
448 | 448 | |
|
449 | if upgrade_op.has_upgrade_action(b're-delta-all'): | |
|
450 | deltareuse = revlog.revlog.DELTAREUSENEVER | |
|
451 | elif upgrade_op.has_upgrade_action(b're-delta-parent'): | |
|
452 | deltareuse = revlog.revlog.DELTAREUSESAMEREVS | |
|
453 | elif upgrade_op.has_upgrade_action(b're-delta-multibase'): | |
|
454 | deltareuse = revlog.revlog.DELTAREUSESAMEREVS | |
|
455 | elif upgrade_op.has_upgrade_action(b're-delta-fulladd'): | |
|
456 | deltareuse = revlog.revlog.DELTAREUSEFULLADD | |
|
457 | else: | |
|
458 | deltareuse = revlog.revlog.DELTAREUSEALWAYS | |
|
459 | ||
|
460 | 449 | with dstrepo.transaction(b'upgrade') as tr: |
|
461 | 450 | _clonerevlogs( |
|
462 | 451 | ui, |
|
463 | 452 | srcrepo, |
|
464 | 453 | dstrepo, |
|
465 | 454 | tr, |
|
466 | deltareuse, | |
|
455 | upgrade_op.delta_reuse_mode, | |
|
467 | 456 | upgrade_op.has_upgrade_action(b're-delta-multibase'), |
|
468 | 457 | revlogs=upgrade_op.revlogs_to_process, |
|
469 | 458 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now