##// 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 # Whether this improvement changes repository requirements
94 # Whether this improvement changes repository requirements
95 touches_requirements = True
95 touches_requirements = True
96
96
97 # Whether this improvement changes working copy requirements
98 touches_wc_requirements = True
99
97 # Whether this improvement touches the dirstate
100 # Whether this improvement touches the dirstate
98 touches_dirstate = False
101 touches_dirstate = False
99
102
@@ -188,7 +191,8 class dirstatev2(requirementformatvarian
188 touches_filelogs = False
191 touches_filelogs = False
189 touches_manifests = False
192 touches_manifests = False
190 touches_changelog = False
193 touches_changelog = False
191 touches_requirements = True
194 touches_requirements = False
195 touches_wc_requirements = True
192 touches_dirstate = True
196 touches_dirstate = True
193
197
194
198
@@ -719,10 +723,24 class UpgradeOperation(object):
719 return set([a.name for a in self.upgrade_actions])
723 return set([a.name for a in self.upgrade_actions])
720
724
721 @property
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 def requirements_only(self):
738 def requirements_only(self):
723 # does the operation only touches repository requirement
739 # does the operation only touches repository requirement
724 return (
740 return (
725 self.touches_requirements
741 (self.touches_requirements
742 or self.touches_wc_requirements
743 )
726 and not self.touches_filelogs
744 and not self.touches_filelogs
727 and not self.touches_manifests
745 and not self.touches_manifests
728 and not self.touches_changelog
746 and not self.touches_changelog
@@ -769,6 +787,19 class UpgradeOperation(object):
769 return False
787 return False
770
788
771 @property
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 def touches_requirements(self):
803 def touches_requirements(self):
773 for a in self.upgrade_actions:
804 for a in self.upgrade_actions:
774 # optimisations are used to re-process revlogs and does not result
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