changeset 21059:d7e233df48e6

repoview: make the conversion from node to rev explicit while computing hidden You cannot use `repo[...]` lookup here. 1. It is slow 2. It is very likely to trigger a hidden computation itself, entering an infinite loop.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sun, 13 Apr 2014 16:36:51 -0400
parents 5152afc145e5
children 0bea9db7543b
files mercurial/repoview.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repoview.py	Sun Apr 13 16:39:31 2014 -0400
+++ b/mercurial/repoview.py	Sun Apr 13 16:36:51 2014 -0400
@@ -27,6 +27,7 @@
     hideable = hideablerevs(repo)
     blockers = []
     if hideable:
+        # We use cl to avoid recursive lookup from repo[xxx]
         cl = repo.changelog
         firsthideable = min(hideable)
         revs = cl.revs(start=firsthideable)
@@ -36,11 +37,11 @@
         for par in repo[None].parents():
             blockers.append(par.rev())
         for bm in repo._bookmarks.values():
-            blockers.append(repo[bm].rev())
+            blockers.append(cl.rev(bm))
         tags = {}
         tagsmod.readlocaltags(repo.ui, repo, tags, {})
         if tags:
-            blockers.extend(repo[t[0]].rev() for t in tags.values())
+            blockers.extend(cl.rev(t[0]) for t in tags.values())
     return blockers
 
 def computehidden(repo):