Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 22531:22ba2c0825da
revset: use `subset &` in `ancestorspec`
This takes advantage of the `fullreposet` smartness.
revset #0: tip~25
0) wall 0.004800 comb 0.010000 user 0.010000 sys 0.000000 (best of 259)
1) wall 0.002475 comb 0.000000 user 0.000000 sys 0.000000 (best of 717)
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 17 Sep 2014 10:57:47 -0700 |
parents | faf4f63533ff |
children | 0cf46b8298fe |
comparison
equal
deleted
inserted
replaced
22530:faf4f63533ff | 22531:22ba2c0825da |
---|---|
374 cl = repo.changelog | 374 cl = repo.changelog |
375 for r in getset(repo, baseset(cl), x): | 375 for r in getset(repo, baseset(cl), x): |
376 for i in range(n): | 376 for i in range(n): |
377 r = cl.parentrevs(r)[0] | 377 r = cl.parentrevs(r)[0] |
378 ps.add(r) | 378 ps.add(r) |
379 return subset.filter(ps.__contains__) | 379 return subset & ps |
380 | 380 |
381 def author(repo, subset, x): | 381 def author(repo, subset, x): |
382 """``author(string)`` | 382 """``author(string)`` |
383 Alias for ``user(string)``. | 383 Alias for ``user(string)``. |
384 """ | 384 """ |