diff mercurial/revset.py @ 35270:0d27685b4a2f

dagop: copy basefilectx.ancestors() to free function The primary goal of this series is to make follow() support multiple start revisions. dagop.filectxancestors() will be extended to take multiple filectxs. basefilectx.ancestors() is not forwarded to this function because doing that would resurrect the performance issue fixed by 24b57c3899f8.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 22 Sep 2016 17:16:53 +0900
parents 39b094e4ae2c
children 70e86db6a913
line wrap: on
line diff
--- a/mercurial/revset.py	Thu Sep 22 15:52:09 2016 +0900
+++ b/mercurial/revset.py	Thu Sep 22 17:16:53 2016 +0900
@@ -930,7 +930,8 @@
         s = set()
         for fname in files:
             fctx = c[fname]
-            s = s.union(set(c.rev() for c in fctx.ancestors(followfirst)))
+            a = dagop.filectxancestors(fctx, followfirst)
+            s = s.union(set(c.rev() for c in a))
             # include the revision responsible for the most recent version
             s.add(fctx.introrev())
     else: