Patchwork D10180: typing: add an assertion to the upgrade engine to help pytype

login
register
mail settings
Submitter phabricator
Date March 12, 2021, 6:09 p.m.
Message ID <differential-rev-PHID-DREV-q6ysxmghtzvbhw7ygymc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48492/
State Superseded
Headers show

Comments

phabricator - March 12, 2021, 6:09 p.m.
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

Patch

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