##// END OF EJS Templates
touches_wc_requirements
marmoute -
r49267:d46cf894 stable draft
parent child Browse files
Show More
@@ -94,6 +94,9 class improvement(object):
94 94 # Whether this improvement changes repository requirements
95 95 touches_requirements = True
96 96
97 # Whether this improvement changes working copy requirements
98 touches_wc_requirements = True
99
97 100 # Whether this improvement touches the dirstate
98 101 touches_dirstate = False
99 102
@@ -188,7 +191,8 class dirstatev2(requirementformatvarian
188 191 touches_filelogs = False
189 192 touches_manifests = False
190 193 touches_changelog = False
191 touches_requirements = True
194 touches_requirements = False
195 touches_wc_requirements = True
192 196 touches_dirstate = True
193 197
194 198
@@ -719,10 +723,24 class UpgradeOperation(object):
719 723 return set([a.name for a in self.upgrade_actions])
720 724
721 725 @property
726 def wc_requirements_only(self):
727 # does the operation only touches repository requirement
728 return (
729 self.touches_wc_requirements
730 and not self.touches_requirements
731 and not self.touches_filelogs
732 and not self.touches_manifests
733 and not self.touches_changelog
734 and not self.touches_dirstate
735 )
736
737 @property
722 738 def requirements_only(self):
723 739 # does the operation only touches repository requirement
724 740 return (
725 self.touches_requirements
741 (self.touches_requirements
742 or self.touches_wc_requirements
743 )
726 744 and not self.touches_filelogs
727 745 and not self.touches_manifests
728 746 and not self.touches_changelog
@@ -769,6 +787,19 class UpgradeOperation(object):
769 787 return False
770 788
771 789 @property
790 def touches_wc_requirements(self):
791 for a in self.upgrade_actions:
792 # optimisations are used to re-process revlogs and does not result
793 # in a requirement being added or removed
794 if a.type == OPTIMISATION:
795 pass
796 elif a.touches_wc_requirements:
797 return True
798 for a in self.removed_actions:
799 if a.touches_wc_requirements:
800 return True
801
802 @property
772 803 def touches_requirements(self):
773 804 for a in self.upgrade_actions:
774 805 # optimisations are used to re-process revlogs and does not result
General Comments 0
You need to be logged in to leave comments. Login now