# HG changeset patch # User Pierre-Yves David # Date 2019-11-17 06:25:14 # Node ID c0e04f07a2d4bf29b8e894d447a90ef837ed20c1 # Parent 099e9610308546bfbf6ff946f4a38a814cfbbc0d 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 --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1652,6 +1652,8 @@ class localrepository(object): 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 --git a/tests/test-repo-filters-tiptoe.t b/tests/test-repo-filters-tiptoe.t --- a/tests/test-repo-filters-tiptoe.t +++ b/tests/test-repo-filters-tiptoe.t @@ -49,5 +49,4 @@ Getting the node of `null` $ hg init test-repo $ cd test-repo $ hg log -r null -T "{node}\n" - debug.filters: computing revision filter for "visible" 0000000000000000000000000000000000000000