changeset 35495:07fdac1d5c66

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
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 18 Dec 2017 17:50:02 +0530
parents dd911f95cbda
children 8bb90cc4668e
files mercurial/branchmap.py mercurial/repoview.py
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/branchmap.py	Fri Dec 15 04:25:32 2017 +0530
+++ b/mercurial/branchmap.py	Mon Dec 18 17:50:02 2017 +0530
@@ -84,6 +84,7 @@
 # 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'}
--- a/mercurial/repoview.py	Fri Dec 15 04:25:32 2017 +0530
+++ b/mercurial/repoview.py	Mon Dec 18 17:50:02 2017 +0530
@@ -143,6 +143,7 @@
 # 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}