comparison 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
comparison
equal deleted inserted replaced
35269:2af38229f147 35270:0d27685b4a2f
928 files = c.manifest().walk(matcher) 928 files = c.manifest().walk(matcher)
929 929
930 s = set() 930 s = set()
931 for fname in files: 931 for fname in files:
932 fctx = c[fname] 932 fctx = c[fname]
933 s = s.union(set(c.rev() for c in fctx.ancestors(followfirst))) 933 a = dagop.filectxancestors(fctx, followfirst)
934 s = s.union(set(c.rev() for c in a))
934 # include the revision responsible for the most recent version 935 # include the revision responsible for the most recent version
935 s.add(fctx.introrev()) 936 s.add(fctx.introrev())
936 else: 937 else:
937 s = dagop.revancestors(repo, baseset([c.rev()]), followfirst) 938 s = dagop.revancestors(repo, baseset([c.rev()]), followfirst)
938 939