changeset 43559:90de6bcdf226

index: use `index.get_rev` in `repoview.pinnedrevs` We simplify the code in the process Differential Revision: https://phab.mercurial-scm.org/D7337
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 09 Nov 2019 13:23:52 +0100
parents 1542773ffa5d
children 65d6770273c8
files mercurial/repoview.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repoview.py	Sat Nov 09 13:23:52 2019 +0100
+++ b/mercurial/repoview.py	Sat Nov 09 13:23:52 2019 +0100
@@ -59,8 +59,9 @@
     tags = {}
     tagsmod.readlocaltags(repo.ui, repo, tags, {})
     if tags:
-        rev, nodemap = cl.rev, cl.nodemap
-        pinned.update(rev(t[0]) for t in tags.values() if t[0] in nodemap)
+        rev = cl.index.get_rev
+        pinned.update(rev(t[0]) for t in tags.values())
+        pinned.discard(None)
     return pinned