Patchwork D1853: visiblity: pass a normal repo to _getfilteredreason

login
register
mail settings
Submitter phabricator
Date Jan. 12, 2018, 11:33 a.m.
Message ID <differential-rev-PHID-DREV-v6nufmgavbekhmbpqjob-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26696/
State Superseded
Headers show

Comments

phabricator - Jan. 12, 2018, 11:33 a.m.
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  There is no reason to pass an unfiltered-repo to _getfilteredreason and
  successorssets, so use a normal repo instead.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/context.py
  mercurial/obsutil.py

CHANGE DETAILS




To: lothiraldan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -875,10 +875,10 @@ 
                                   "%d more"),
 }
 
-def _getfilteredreason(unfilteredrepo, changeid, ctx):
+def _getfilteredreason(repo, changeid, ctx):
     """return a human-friendly string on why a obsolete changeset is hidden
     """
-    successors = successorssets(unfilteredrepo, ctx.node())
+    successors = successorssets(repo, ctx.node())
     fate = _getobsfate(successors)
 
     # Be more precise in case the revision is superseded
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -442,7 +442,7 @@ 
         # If the changeset is obsolete, enrich the message with the reason
         # that made this changeset not visible
         if ctx.obsolete():
-            msg = obsutil._getfilteredreason(unfilteredrepo, changeid, ctx)
+            msg = obsutil._getfilteredreason(repo, changeid, ctx)
         else:
             msg = _("hidden revision '%s'") % changeid