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
--- 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
)