Mercurial > hg
comparison mercurial/revset.py @ 22530:faf4f63533ff
revset: use `subset &` in `bookmark`
Speedup, Weeeeeee!
revset #0: bookmark()
0) wall 0.002240 comb 0.000000 user 0.000000 sys 0.000000 (best of 571)
1) wall 0.000132 comb 0.000000 user 0.000000 sys 0.000000 (best of 14059)
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 17 Sep 2014 19:57:09 -0700 |
parents | 5c53d7888aef |
children | 22ba2c0825da |
comparison
equal
deleted
inserted
replaced
22529:5c53d7888aef | 22530:faf4f63533ff |
---|---|
466 bms.add(repo[bmrev].rev()) | 466 bms.add(repo[bmrev].rev()) |
467 else: | 467 else: |
468 bms = set([repo[r].rev() | 468 bms = set([repo[r].rev() |
469 for r in repo._bookmarks.values()]) | 469 for r in repo._bookmarks.values()]) |
470 bms -= set([node.nullrev]) | 470 bms -= set([node.nullrev]) |
471 return subset.filter(bms.__contains__) | 471 return subset & bms |
472 | 472 |
473 def branch(repo, subset, x): | 473 def branch(repo, subset, x): |
474 """``branch(string or set)`` | 474 """``branch(string or set)`` |
475 All changesets belonging to the given branch or the branches of the given | 475 All changesets belonging to the given branch or the branches of the given |
476 changesets. | 476 changesets. |