--- a/mercurial/upgrade_utils/actions.py Sat Dec 12 17:51:27 2020 +0530
+++ b/mercurial/upgrade_utils/actions.py Sat Dec 12 17:54:59 2020 +0530
@@ -561,8 +561,13 @@
self.ui = ui
self.requirements = requirements
self.actions = actions
+ self._actions_names = set([a.name for a in actions])
self.revlogs_to_process = revlogs_to_process
+ def print_upgrade_actions(self):
+ for a in self.actions:
+ self.ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage))
+
def print_affected_revlogs(self):
if not self.revlogs_to_process:
self.ui.write((b'no revlogs to process\n'))
@@ -572,6 +577,10 @@
self.ui.write((b' - %s\n' % r))
self.ui.write((b'\n'))
+ def has_action(self, name):
+ """ Check whether the upgrade operation will perform this action """
+ return name in self._actions_names
+
### Code checking if a repository can got through the upgrade process at all. #