Mercurial > public > mercurial-scm > hg-stable
diff mercurial/upgrade.py @ 46447: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 | 4f17773fc6b5 |
children | 16c18d5e5dc8 |
line wrap: on
line diff
--- 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)