Patchwork D7337: index: use `index.get_rev` in `repoview.pinnedrevs`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 5:19 a.m.
Message ID <608aa6928374103546b9cc98a11bf6e9@localhost.localdomain>
Download mbox | patch
Permalink /patch/43027/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 5:19 a.m.
marmoute marked an inline comment as done.
marmoute updated this revision to Diff 17844.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7337?vs=17760&id=17844

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

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

AFFECTED FILES
  mercurial/repoview.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -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