comparison mercurial/revset.py @ 30700:323f0c4b43f4

revset: categorize wdir() as very fast function The cost of wdir() should be identical to or cheaper than _intlist().
author Yuya Nishihara <yuya@tcha.org>
date Sat, 20 Aug 2016 17:50:23 +0900
parents 5bda147c3139
children 8b1d87243710
comparison
equal deleted inserted replaced
30699:5bda147c3139 30700:323f0c4b43f4
2604 w = 30 # slower 2604 w = 30 # slower
2605 elif f == "contains": 2605 elif f == "contains":
2606 w = 100 # very slow 2606 w = 100 # very slow
2607 elif f == "ancestor": 2607 elif f == "ancestor":
2608 w = 1 * smallbonus 2608 w = 1 * smallbonus
2609 elif f in ('reverse', 'limit', 'first', '_intlist'): 2609 elif f in ('reverse', 'limit', 'first', 'wdir', '_intlist'):
2610 w = 0 2610 w = 0
2611 elif f == "sort": 2611 elif f == "sort":
2612 w = 10 # assume most sorts look at changelog 2612 w = 10 # assume most sorts look at changelog
2613 else: 2613 else:
2614 w = 1 2614 w = 1