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

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 3:58 p.m.
Message ID <b68eaba6a30c85df0595eed4a19bb668@localhost.localdomain>
Download mbox | patch
Permalink /patch/43081/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 3:58 p.m.
Closed by commit rHG548881608444: index: use `index.get_rev` in `repoview.pinnedrevs` (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/D7337?vs=17844&id=17896

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