mercurial/revlog.py
changeset 17008 553e8f5aba7a
parent 16885 d628bcb3a567
child 17009 0c18aed2fcca
--- a/mercurial/revlog.py	Thu Jun 14 11:43:48 2012 +0200
+++ b/mercurial/revlog.py	Fri Jun 08 07:59:37 2012 -0700
@@ -404,6 +404,14 @@
                     seen.add(parent)
                     yield parent
 
+    def incancestors(self, revs, stoprev=0):
+        """Identical to ancestors() except it also generates the
+        revisions, 'revs'"""
+        for rev in revs:
+            yield rev
+        for rev in self.ancestors(revs, stoprev):
+            yield rev
+
     def descendants(self, revs):
         """Generate the descendants of 'revs' in revision order.