Patchwork D7487: changectx: use unfiltered changelog to access parents of unfiltered revs

login
register
mail settings
Submitter phabricator
Date Nov. 24, 2019, 12:59 a.m.
Message ID <67904cf10e4d10bd5c2e65281e8f49cb@localhost.localdomain>
Download mbox | patch
Permalink /patch/43502/
State Not Applicable
Headers show

Comments

phabricator - Nov. 24, 2019, 12:59 a.m.
Closed by commit rHG5ef259b09475: changectx: use unfiltered changelog to access parents of unfiltered revs (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/D7487?vs=18363&id=18373

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

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

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

CHANGE DETAILS




To: marmoute, #hg-reviewers, indygreg
Cc: 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
@@ -58,7 +58,6 @@ 
 Getting status of null
 
   $ hg status --change null
-  debug.filters: computing revision filter for "visible"
 
 Getting status of working copy
 
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -523,7 +523,12 @@ 
     @propertycache
     def _parents(self):
         repo = self._repo
-        p1, p2 = repo.changelog.parentrevs(self._rev)
+        if self._maybe_filtered:
+            cl = repo.changelog
+        else:
+            cl = repo.unfiltered().changelog
+
+        p1, p2 = cl.parentrevs(self._rev)
         if p2 == nullrev:
             return [repo[p1]]
         return [repo[p1], repo[p2]]