comparison mercurial/dagutil.py @ 20223:37e2bd560805

discovery: make revlogdag work on filtered repo The revlogdag class is a core part of discovery. We need its initialisation to exclude revision filtered out.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 15 Nov 2013 23:27:15 -0500
parents e34106fa0dc3
children 34d4a037dced
comparison
equal deleted inserted replaced
20222:228ae760942f 20223:37e2bd560805
147 147
148 class revlogdag(revlogbaseddag): 148 class revlogdag(revlogbaseddag):
149 '''dag interface to a revlog''' 149 '''dag interface to a revlog'''
150 150
151 def __init__(self, revlog): 151 def __init__(self, revlog):
152 revlogbaseddag.__init__(self, revlog, set(xrange(len(revlog)))) 152 revlogbaseddag.__init__(self, revlog, set(revlog))
153 153
154 def _getheads(self): 154 def _getheads(self):
155 return [r for r in self._revlog.headrevs() if r != nullrev] 155 return [r for r in self._revlog.headrevs() if r != nullrev]
156 156
157 def parents(self, ix): 157 def parents(self, ix):