D1734: repoview: add a new filtername for accessing hidden commits
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Tue Dec 19 12:10:20 UTC 2017
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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().
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1734
AFFECTED FILES
mercurial/branchmap.py
mercurial/repoview.py
CHANGE DETAILS
diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -143,6 +143,7 @@
# Otherwise your filter will have to recompute all its branches cache
# from scratch (very slow).
filtertable = {'visible': (computehidden, set()),
+ 'visible-hidden': (computehidden, set()),
'served': (computeunserved, set()),
'immutable': (computemutable, set()),
'base': (computeimpactable, set())}
diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -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'}
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list