Patchwork D7484: localrepo: mark nullrev has never filtered

login
register
mail settings
Submitter phabricator
Date Nov. 22, 2019, 9:21 a.m.
Message ID <differential-rev-PHID-DREV-62knzshoq5ciwtv5m4gj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43420/
State Superseded
Headers show

Comments

phabricator - Nov. 22, 2019, 9:21 a.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  All repository have a null, and it cannot be filtered.

REPOSITORY
  rHG Mercurial

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

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

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 24, 2019, 12:45 a.m.
This revision is now accepted and ready to land.
indygreg added inline comments.
indygreg accepted this revision.

INLINE COMMENTS

> localrepo.py:1535
>          if changeid == b'null' or changeid == nullrev:
> -            return context.changectx(self, nullrev, nullid)
> +            return context.changectx(self, nullrev, nullid, False)
>          if changeid == b'tip':

I'm going to add a named argument in flight because I like readability.

REPOSITORY
  rHG Mercurial

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

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

To: marmoute, #hg-reviewers, indygreg
Cc: indygreg, 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
@@ -54,6 +54,5 @@ 
 Getting basic changeset inforation about `null`
 
   $ hg log -r null -T "{node}\n{date}\n"
-  debug.filters: computing revision filter for "visible"
   0000000000000000000000000000000000000000
   0.00
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1532,7 +1532,7 @@ 
 
         # dealing with some special values
         if changeid == b'null' or changeid == nullrev:
-            return context.changectx(self, nullrev, nullid)
+            return context.changectx(self, nullrev, nullid, False)
         if changeid == b'tip':
             node = self.changelog.tip()
             rev = self.changelog.rev(node)