Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 35272:70e86db6a913
dagop: yield intro filectx by filectxancestors()
This is the convention of dagop.*ancestors() functions.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 22 Sep 2016 17:48:46 +0900 |
parents | 0d27685b4a2f |
children | 205c3c6c1a51 |
comparison
equal
deleted
inserted
replaced
35271:d90c534099b1 | 35272:70e86db6a913 |
---|---|
927 | 927 |
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].introfilectx() |
933 a = dagop.filectxancestors(fctx, followfirst) | 933 a = dagop.filectxancestors(fctx, followfirst) |
934 s = s.union(set(c.rev() for c in a)) | 934 s = s.union(set(c.rev() for c in a)) |
935 # include the revision responsible for the most recent version | |
936 s.add(fctx.introrev()) | |
937 else: | 935 else: |
938 s = dagop.revancestors(repo, baseset([c.rev()]), followfirst) | 936 s = dagop.revancestors(repo, baseset([c.rev()]), followfirst) |
939 | 937 |
940 return subset & s | 938 return subset & s |
941 | 939 |