Patchwork D7455: revset: add an assertion to help pytype

login
register
mail settings
Submitter phabricator
Date Nov. 21, 2019, 1:35 p.m.
Message ID <7e663beffa4a6032e41c2bc7d333303c@localhost.localdomain>
Download mbox | patch
Permalink /patch/43384/
State Not Applicable
Headers show

Comments

phabricator - Nov. 21, 2019, 1:35 p.m.
Closed by commit rHG6c6d67fc45cb: revset: add an assertion to help pytype (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7455?vs=18244&id=18256

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7455/new/

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

AFFECTED FILES
  mercurial/revset.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, indygreg, dlax, pulkit
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: