diff mercurial/revset.py @ 35276:205c3c6c1a51

dagop: extend filectxancestors() to walk multiple files
author Yuya Nishihara <yuya@tcha.org>
date Thu, 22 Sep 2016 18:23:58 +0900
parents 70e86db6a913
children 2cb05e6043be
line wrap: on
line diff
--- a/mercurial/revset.py	Thu Sep 22 18:18:56 2016 +0900
+++ b/mercurial/revset.py	Thu Sep 22 18:23:58 2016 +0900
@@ -927,11 +927,9 @@
 
         files = c.manifest().walk(matcher)
 
-        s = set()
-        for fname in files:
-            fctx = c[fname].introfilectx()
-            a = dagop.filectxancestors(fctx, followfirst)
-            s = s.union(set(c.rev() for c in a))
+        fctxs = [c[f].introfilectx() for f in files]
+        a = dagop.filectxancestors(fctxs, followfirst)
+        s = set(c.rev() for c in a)
     else:
         s = dagop.revancestors(repo, baseset([c.rev()]), followfirst)