diff mercurial/upgrade_utils/actions.py @ 46375:2e8a844d0ae0

upgrade: don't create store backup if `--no-backup` is passed If the user explicitly mentioned that they don't need backup, then let's not create it. Differential Revision: https://phab.mercurial-scm.org/D9770
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 14 Jan 2021 16:25:40 +0530
parents 4b0192f592cf
children a83e1496d943
line wrap: on
line diff
--- a/mercurial/upgrade_utils/actions.py	Mon Dec 14 10:44:29 2020 +0100
+++ b/mercurial/upgrade_utils/actions.py	Thu Jan 14 16:25:40 2021 +0530
@@ -626,6 +626,7 @@
         upgrade_actions,
         removed_actions,
         revlogs_to_process,
+        backup_store,
     ):
         self.ui = ui
         self.new_requirements = new_requirements
@@ -670,6 +671,9 @@
             b're-delta-multibase' in self._upgrade_actions_names
         )
 
+        # should this operation create a backup of the store
+        self.backup_store = backup_store
+
     def _write_labeled(self, l, label):
         """
         Utility function to aid writing of a list under one label