# HG changeset patch # User Boris Feld # Date 1515755741 0 # Node ID 22c42bfbe7abf56ee393e9d8fdbe4830c25da859 # Parent c026547454ddedf5f5906b6e6986f589ab7d9295 visibility: pass a normal repo to _getfilteredreason There is no reason to pass an unfiltered-repo to _getfilteredreason and successorssets, so use a normal repo instead. Differential Revision: https://phab.mercurial-scm.org/D1853 diff -r c026547454dd -r 22c42bfbe7ab mercurial/context.py --- a/mercurial/context.py Fri Jan 12 11:10:18 2018 +0000 +++ b/mercurial/context.py Fri Jan 12 11:15:41 2018 +0000 @@ -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 diff -r c026547454dd -r 22c42bfbe7ab mercurial/obsutil.py --- a/mercurial/obsutil.py Fri Jan 12 11:10:18 2018 +0000 +++ b/mercurial/obsutil.py Fri Jan 12 11:15:41 2018 +0000 @@ -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