# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2017-12-18 12:20:02 # Node ID 07fdac1d5c666cf00ddcd5358eba9cfd146d099a # Parent dd911f95cbdae3ad6e1ed04b487b1ddf32cb3dbd repoview: add a new filtername for accessing hidden commits This patch adds a new filter 'visible-hidden' for repository and will be used to return a repo object with user passed revisions unhidden. Unlike the directaccess extension in fb-hgext and previous series adding the functionality, this time we introduce only one new filter as whether to warn user or not is handled by scmutil.unhidehashlikerevs(). Differential Revision: https://phab.mercurial-scm.org/D1734 diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -84,6 +84,7 @@ def read(repo): # This create and ordering used for branchmap purpose. # the ordering may be partial subsettable = {None: 'visible', + 'visible-hidden': 'visible', 'visible': 'served', 'served': 'immutable', 'immutable': 'base'} diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -143,6 +143,7 @@ def computeimpactable(repo, visibilityex # Otherwise your filter will have to recompute all its branches cache # from scratch (very slow). filtertable = {'visible': computehidden, + 'visible-hidden': computehidden, 'served': computeunserved, 'immutable': computemutable, 'base': computeimpactable}