diff mercurial/revset.py @ 35296:2cb05e6043be

dagop: add smartset interface to filectxancestors() The original filectx API is kept public since we'll need it to walk ancestor (rev, match) pairs efficiently. The current implementation scans ancestors twice for 'hg log -fp FILE'.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 22 Oct 2017 18:57:42 +0900
parents 205c3c6c1a51
children 921680c3e2ea
line wrap: on
line diff
--- a/mercurial/revset.py	Thu Dec 07 13:20:47 2017 -0800
+++ b/mercurial/revset.py	Sun Oct 22 18:57:42 2017 +0900
@@ -928,8 +928,7 @@
         files = c.manifest().walk(matcher)
 
         fctxs = [c[f].introfilectx() for f in files]
-        a = dagop.filectxancestors(fctxs, followfirst)
-        s = set(c.rev() for c in a)
+        s = dagop.filerevancestors(fctxs, followfirst)
     else:
         s = dagop.revancestors(repo, baseset([c.rev()]), followfirst)