Show More
@@ -24,38 +24,6 b' RECLONES_REQUIREMENTS = {' | |||
|
24 | 24 | } |
|
25 | 25 | |
|
26 | 26 | |
|
27 | def requiredsourcerequirements(repo): | |
|
28 | """Obtain requirements required to be present to upgrade a repo. | |
|
29 | ||
|
30 | An upgrade will not be allowed if the repository doesn't have the | |
|
31 | requirements returned by this function. | |
|
32 | """ | |
|
33 | return { | |
|
34 | # Introduced in Mercurial 0.9.2. | |
|
35 | b'revlogv1', | |
|
36 | # Introduced in Mercurial 0.9.2. | |
|
37 | b'store', | |
|
38 | } | |
|
39 | ||
|
40 | ||
|
41 | def blocksourcerequirements(repo): | |
|
42 | """Obtain requirements that will prevent an upgrade from occurring. | |
|
43 | ||
|
44 | An upgrade cannot be performed if the source repository contains a | |
|
45 | requirements in the returned set. | |
|
46 | """ | |
|
47 | return { | |
|
48 | # The upgrade code does not yet support these experimental features. | |
|
49 | # This is an artificial limitation. | |
|
50 | requirements.TREEMANIFEST_REQUIREMENT, | |
|
51 | # This was a precursor to generaldelta and was never enabled by default. | |
|
52 | # It should (hopefully) not exist in the wild. | |
|
53 | b'parentdelta', | |
|
54 | # Upgrade should operate on the actual store, not the shared link. | |
|
55 | requirements.SHARED_REQUIREMENT, | |
|
56 | } | |
|
57 | ||
|
58 | ||
|
59 | 27 | def supportremovedrequirements(repo): |
|
60 | 28 | """Obtain requirements that can be removed during an upgrade. |
|
61 | 29 | |
@@ -667,6 +635,41 b' def determineactions(repo, deficiencies,' | |||
|
667 | 635 | return newactions |
|
668 | 636 | |
|
669 | 637 | |
|
638 | ### Code checking if a repository can got through the upgrade process at all. # | |
|
639 | ||
|
640 | ||
|
641 | def requiredsourcerequirements(repo): | |
|
642 | """Obtain requirements required to be present to upgrade a repo. | |
|
643 | ||
|
644 | An upgrade will not be allowed if the repository doesn't have the | |
|
645 | requirements returned by this function. | |
|
646 | """ | |
|
647 | return { | |
|
648 | # Introduced in Mercurial 0.9.2. | |
|
649 | b'revlogv1', | |
|
650 | # Introduced in Mercurial 0.9.2. | |
|
651 | b'store', | |
|
652 | } | |
|
653 | ||
|
654 | ||
|
655 | def blocksourcerequirements(repo): | |
|
656 | """Obtain requirements that will prevent an upgrade from occurring. | |
|
657 | ||
|
658 | An upgrade cannot be performed if the source repository contains a | |
|
659 | requirements in the returned set. | |
|
660 | """ | |
|
661 | return { | |
|
662 | # The upgrade code does not yet support these experimental features. | |
|
663 | # This is an artificial limitation. | |
|
664 | requirements.TREEMANIFEST_REQUIREMENT, | |
|
665 | # This was a precursor to generaldelta and was never enabled by default. | |
|
666 | # It should (hopefully) not exist in the wild. | |
|
667 | b'parentdelta', | |
|
668 | # Upgrade should operate on the actual store, not the shared link. | |
|
669 | requirements.SHARED_REQUIREMENT, | |
|
670 | } | |
|
671 | ||
|
672 | ||
|
670 | 673 | def check_source_requirements(repo): |
|
671 | 674 | """Ensure that no existing requirements prevent the repository upgrade""" |
|
672 | 675 |
General Comments 0
You need to be logged in to leave comments.
Login now