comparison mercurial/revset.py @ 22532:0cf46b8298fe

revset: use `subset &` in `bisect` This takes advantage of the `fullreposet` smartness. revset #0: bisect(range) 0) wall 0.014007 comb 0.010000 user 0.010000 sys 0.000000 (best of 115) 1) wall 0.005556 comb 0.010000 user 0.010000 sys 0.000000 (best of 235)
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 17 Sep 2014 10:57:57 -0700
parents 22ba2c0825da
children 5b65429721d5
comparison
equal deleted inserted replaced
22531:22ba2c0825da 22532:0cf46b8298fe
424 - ``current`` : the cset currently being bisected 424 - ``current`` : the cset currently being bisected
425 """ 425 """
426 # i18n: "bisect" is a keyword 426 # i18n: "bisect" is a keyword
427 status = getstring(x, _("bisect requires a string")).lower() 427 status = getstring(x, _("bisect requires a string")).lower()
428 state = set(hbisect.get(repo, status)) 428 state = set(hbisect.get(repo, status))
429 return subset.filter(state.__contains__) 429 return subset & state
430 430
431 # Backward-compatibility 431 # Backward-compatibility
432 # - no help entry so that we do not advertise it any more 432 # - no help entry so that we do not advertise it any more
433 def bisected(repo, subset, x): 433 def bisected(repo, subset, x):
434 return bisect(repo, subset, x) 434 return bisect(repo, subset, x)