pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches.
REVISION SUMMARY `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. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9675 AFFECTED FILES mercurial/upgrade.py CHANGE DETAILS diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -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 ) To: pulkit, #hg-reviewers Cc: mercurial-patches, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel