mercurial/upgrade_utils/actions.py
changeset 46192 25d11b24dedf
parent 46191 aba979b1b90b
child 46205 53d083fa1f83
--- a/mercurial/upgrade_utils/actions.py	Sat Dec 12 18:09:16 2020 +0530
+++ b/mercurial/upgrade_utils/actions.py	Mon Dec 14 13:48:25 2020 +0530
@@ -583,6 +583,12 @@
         self._preserved_requirements = (
             self.current_requirements & self.new_requirements
         )
+        # optimizations which are not used and it's recommended that they
+        # should use them
+        all_optimizations = findoptimizations(None)
+        self.unused_optimizations = [
+            i for i in all_optimizations if i not in self.actions
+        ]
 
     def _write_labeled(self, l, label):
         """
@@ -640,6 +646,10 @@
                 self.ui.write((b'  - %s\n' % r))
         self.ui.write((b'\n'))
 
+    def print_unused_optimizations(self):
+        for i in self.unused_optimizations:
+            self.ui.status(_(b'%s\n   %s\n\n') % (i.name, i.description))
+
     def has_action(self, name):
         """ Check whether the upgrade operation will perform this action """
         return name in self._actions_names