From patchwork Fri Mar 12 18:09:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10180: typing: add an assertion to the upgrade engine to help pytype From: phabricator X-Patchwork-Id: 48492 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 12 Mar 2021 18:09:46 +0000 mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D10180 AFFECTED FILES mercurial/upgrade_utils/engine.py CHANGE DETAILS To: mharbison72, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/upgrade_utils/engine.py b/mercurial/upgrade_utils/engine.py --- a/mercurial/upgrade_utils/engine.py +++ b/mercurial/upgrade_utils/engine.py @@ -516,6 +516,7 @@ # reference to its new location. So clean it up manually. Alternatively, we # could update srcrepo.svfs and other variables to point to the new # location. This is simpler. + assert backupvfs is not None # help pytype backupvfs.unlink(b'store/lock') return backuppath