Patchwork D7481: localrepo: recognize trivial "null" queries in `anyrev`

login
register
mail settings
Submitter phabricator
Date Nov. 23, 2019, 4:08 a.m.
Message ID <396a1a9d84a72da79fab548d7e969858@localhost.localdomain>
Download mbox | patch
Permalink /patch/43462/
State Not Applicable
Headers show

Comments

phabricator - Nov. 23, 2019, 4:08 a.m.
Closed by commit rHGc0e04f07a2d4: localrepo: recognize trivial &quot;null&quot; queries in `anyrev` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7481?vs=18288&id=18333

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7481/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7481

AFFECTED FILES
  mercurial/localrepo.py
  tests/test-repo-filters-tiptoe.t

CHANGE DETAILS




To: marmoute, #hg-reviewers, indygreg
Cc: mjpieters, mercurial-devel

Patch

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 @@ 
   $ hg init test-repo
   $ cd test-repo
   $ hg log -r null -T "{node}\n"
-  debug.filters: computing revision filter for "visible"
   0000000000000000000000000000000000000000
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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,