# HG changeset patch # User Pierre-Yves David # Date 1573971914 -3600 # Node ID 09409a3fc3cc17a55f7a7407fda8d5cd0ff3268a # Parent 998dd6a8fd9801015dae7bbdd804ead36c1a2fed localrepo: recognize trivial "null" queries in `anyrev` Bypassing the revset logic for trivial "null" queries means we can avoid to trigger the filtering logic in some cases. Differential Revision: https://phab.mercurial-scm.org/D7481 diff -r 998dd6a8fd98 -r 09409a3fc3cc mercurial/localrepo.py --- a/mercurial/localrepo.py Sun Nov 17 06:36:50 2019 +0100 +++ b/mercurial/localrepo.py Sun Nov 17 07:25:14 2019 +0100 @@ -1652,6 +1652,8 @@ definitions overriding user aliases, set ``localalias`` to ``{name: definitionstring}``. ''' + if specs == [b'null']: + return revset.baseset([nullrev]) if user: m = revset.matchany( self.ui, diff -r 998dd6a8fd98 -r 09409a3fc3cc tests/test-repo-filters-tiptoe.t --- a/tests/test-repo-filters-tiptoe.t Sun Nov 17 06:36:50 2019 +0100 +++ b/tests/test-repo-filters-tiptoe.t Sun Nov 17 07:25:14 2019 +0100 @@ -49,5 +49,4 @@ $ hg init test-repo $ cd test-repo $ hg log -r null -T "{node}\n" - debug.filters: computing revision filter for "visible" 0000000000000000000000000000000000000000