mercurial/tags.py
branchstable
changeset 50942 75d3306fbc9a
parent 50939 e4c4adb694f5
child 51152 6a78b5a1d1ab
--- a/mercurial/tags.py	Thu Jun 22 19:41:26 2023 +0200
+++ b/mercurial/tags.py	Wed Jun 21 21:57:44 2023 +0200
@@ -190,10 +190,9 @@
         _updatetags(cachetags, alltags)
         return alltags
 
+    has_node = repo.changelog.index.has_node
     for head in reversed(heads):  # oldest to newest
-        assert repo.changelog.index.has_node(
-            head
-        ), b"tag cache returned bogus head %s" % short(head)
+        assert has_node(head), b"tag cache returned bogus head %s" % short(head)
     fnodes = _filterfnodes(tagfnode, reversed(heads))
     alltags = _tagsfromfnodes(ui, repo, fnodes)