repoview: use set for blockers
Blockers should be unique but tags and bookmarks could point to the same rev,
therefore use a set to ensure that we don't have duplicates.
--- a/mercurial/repoview.py Wed Aug 13 15:06:58 2014 -0500
+++ b/mercurial/repoview.py Tue Aug 12 16:42:24 2014 -0700
@@ -33,16 +33,16 @@
revs = cl.revs(start=firsthideable)
tofilter = repo.revs(
'(%ld) and children(%ld)', list(revs), list(hideable))
- blockers = [r for r in tofilter if r not in hideable]
+ blockers = set([r for r in tofilter if r not in hideable])
for par in repo[None].parents():
- blockers.append(par.rev())
+ blockers.add(par.rev())
for bm in repo._bookmarks.values():
- blockers.append(cl.rev(bm))
+ blockers.add(cl.rev(bm))
tags = {}
tagsmod.readlocaltags(repo.ui, repo, tags, {})
if tags:
rev, nodemap = cl.rev, cl.nodemap
- blockers.extend(rev(t[0]) for t in tags.values() if t[0] in nodemap)
+ blockers.update(rev(t[0]) for t in tags.values() if t[0] in nodemap)
return blockers
def computehidden(repo):