Patchwork D7455: revset: add an assertion to help pytype

login
register
mail settings
Submitter phabricator
Date Nov. 19, 2019, 10:46 p.m.
Message ID <differential-rev-PHID-DREV-23h246d67xvp46kb4qj6-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43368/
State Superseded
Headers show

Comments

phabricator - Nov. 19, 2019, 10:46 p.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7455

AFFECTED FILES
  mercurial/revset.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -684,6 +684,8 @@ 
             mcache[0] = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c)
         m = mcache[0]
         fname = None
+
+        assert m is not None  # help pytype
         if not m.anypats() and len(m.files()) == 1:
             fname = m.files()[0]
         if fname is not None: