Patchwork D7342: index: use `index.has_node` in `tags.findglobaltags`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 8:41 a.m.
Message ID <435731139f3d40e731f675c2fa19fb54@localhost.localdomain>
Download mbox | patch
Permalink /patch/43059/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 8:41 a.m.
Closed by commit rHG103b4430c1ae: index: use `index.has_node` in `tags.findglobaltags` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7342?vs=17765&id=17874

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

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

AFFECTED FILES
  mercurial/tags.py

CHANGE DETAILS




To: marmoute, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/mercurial/tags.py b/mercurial/tags.py
--- a/mercurial/tags.py
+++ b/mercurial/tags.py
@@ -194,8 +194,8 @@ 
         return alltags
 
     for head in reversed(heads):  # oldest to newest
-        assert (
-            head in repo.changelog.nodemap
+        assert repo.changelog.index.has_node(
+            head
         ), b"tag cache returned bogus head %s" % short(head)
     fnodes = _filterfnodes(tagfnode, reversed(heads))
     alltags = _tagsfromfnodes(ui, repo, fnodes)