# HG changeset patch # User Pierre-Yves David # Date 2019-11-09 12:23:52 # Node ID 90de6bcdf2264b64292793b87276549b32e710dc # Parent 1542773ffa5db3ab05b908a4b4dd10faca43d381 index: use `index.get_rev` in `repoview.pinnedrevs` We simplify the code in the process Differential Revision: https://phab.mercurial-scm.org/D7337 diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -59,8 +59,9 @@ def pinnedrevs(repo): 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