changeset 46221:0ca98ed828f9

upgrade: remove unnecessary `is None` check `upgrade_engine.upgrade()` always return the `backuppath` value and there are not early returns. Hence I don't see how `backuppath` can be None. Adding extra unncessary safe checks hides unknown bugs. Hence removing it. Differential Revision: https://phab.mercurial-scm.org/D9675
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 31 Dec 2020 19:24:23 +0530
parents 1ca7865c245d
children e22aed089567
files mercurial/upgrade.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/upgrade.py	Thu Dec 31 14:45:16 2020 +0530
+++ b/mercurial/upgrade.py	Thu Dec 31 19:24:23 2020 +0530
@@ -205,7 +205,7 @@
                 backuppath = upgrade_engine.upgrade(
                     ui, repo, dstrepo, upgrade_op
                 )
-            if not (backup or backuppath is None):
+            if not backup:
                 ui.status(
                     _(b'removing old repository content %s\n') % backuppath
                 )