# HG changeset patch # User Yuya Nishihara <y...@tcha.org> # Date 1471683023 -32400 # Sat Aug 20 17:50:23 2016 +0900 # Node ID 8464d3337540ccf9a2a41108f470dff363e46947 # Parent 77cde77a8f4c9717e36b8b5d62b9518e68c1ac27 revset: categorize wdir() as very fast function
The cost of wdir() should be identical to or cheaper than _intlist(). diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2606,7 +2606,7 @@ def _optimize(x, small): w = 100 # very slow elif f == "ancestor": w = 1 * smallbonus - elif f in ('reverse', 'limit', 'first', '_intlist'): + elif f in ('reverse', 'limit', 'first', 'wdir', '_intlist'): w = 0 elif f == "sort": w = 10 # assume most sorts look at changelog _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel