comparison mercurial/revset.py @ 22535:44f471102f3a

revset: use `subset &` in `follow` This takes advantage of the `fullreposet` smartness. revset #0: follow(COPYING) 0) wall 0.002446 comb 0.000000 user 0.000000 sys 0.000000 (best of 735) 1) wall 0.000331 comb 0.000000 user 0.000000 sys 0.000000 (best of 5672)
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 17 Sep 2014 10:59:16 -0700
parents 6261b9c549a2
children 8040a44aab1c
comparison
equal deleted inserted replaced
22534:6261b9c549a2 22535:44f471102f3a
832 else: 832 else:
833 return baseset([]) 833 return baseset([])
834 else: 834 else:
835 s = _revancestors(repo, baseset([c.rev()]), followfirst) 835 s = _revancestors(repo, baseset([c.rev()]), followfirst)
836 836
837 return subset.filter(s.__contains__) 837 return subset & s
838 838
839 def follow(repo, subset, x): 839 def follow(repo, subset, x):
840 """``follow([file])`` 840 """``follow([file])``
841 An alias for ``::.`` (ancestors of the working copy's first parent). 841 An alias for ``::.`` (ancestors of the working copy's first parent).
842 If a filename is specified, the history of the given file is followed, 842 If a filename is specified, the history of the given file is followed,