mercurial/revlog.py
changeset 40152 adbf8ca239e4
parent 40056 324b4b10351e
child 40180 ba70e3acf58a
equal deleted inserted replaced
40151:38ac525b44c9 40152:adbf8ca239e4
   646                 raise error.WdirUnsupported
   646                 raise error.WdirUnsupported
   647             raise
   647             raise
   648 
   648 
   649         return entry[5], entry[6]
   649         return entry[5], entry[6]
   650 
   650 
       
   651     # fast parentrevs(rev) where rev isn't filtered
       
   652     _uncheckedparentrevs = parentrevs
       
   653 
   651     def node(self, rev):
   654     def node(self, rev):
   652         try:
   655         try:
   653             return self.index[rev][7]
   656             return self.index[rev][7]
   654         except IndexError:
   657         except IndexError:
   655             if rev == wdirrev:
   658             if rev == wdirrev:
   745         """Generate the ancestors of 'revs' in reverse topological order.
   748         """Generate the ancestors of 'revs' in reverse topological order.
   746         Does not generate revs lower than stoprev.
   749         Does not generate revs lower than stoprev.
   747 
   750 
   748         See the documentation for ancestor.lazyancestors for more details."""
   751         See the documentation for ancestor.lazyancestors for more details."""
   749 
   752 
   750         return ancestor.lazyancestors(self.parentrevs, revs, stoprev=stoprev,
   753         # first, make sure start revisions aren't filtered
   751                                       inclusive=inclusive)
   754         revs = list(revs)
       
   755         checkrev = self.node
       
   756         for r in revs:
       
   757             checkrev(r)
       
   758         # and we're sure ancestors aren't filtered as well
       
   759         return ancestor.lazyancestors(self._uncheckedparentrevs, revs,
       
   760                                       stoprev=stoprev, inclusive=inclusive)
   752 
   761 
   753     def descendants(self, revs):
   762     def descendants(self, revs):
   754         return dagop.descendantrevs(revs, self.revs, self.parentrevs)
   763         return dagop.descendantrevs(revs, self.revs, self.parentrevs)
   755 
   764 
   756     def findcommonmissing(self, common=None, heads=None):
   765     def findcommonmissing(self, common=None, heads=None):