mercurial/upgrade.py
changeset 46375 2e8a844d0ae0
parent 46333 2eb5fe13461b
child 46414 16c18d5e5dc8
--- a/mercurial/upgrade.py	Mon Dec 14 10:44:29 2020 +0100
+++ b/mercurial/upgrade.py	Thu Jan 14 16:25:40 2021 +0530
@@ -118,6 +118,7 @@
         up_actions,
         removed_actions,
         revlogs,
+        backup,
     )
 
     if not run:
@@ -215,12 +216,6 @@
                 backuppath = upgrade_engine.upgrade(
                     ui, repo, dstrepo, upgrade_op
                 )
-            if not backup:
-                ui.status(
-                    _(b'removing old repository content %s\n') % backuppath
-                )
-                repo.vfs.rmtree(backuppath, forcibly=True)
-                backuppath = None
 
         finally:
             ui.status(_(b'removing temporary repository %s\n') % tmppath)