Patchwork D1734: repoview: add a new filtername for accessing hidden commits

login
register
mail settings
Submitter phabricator
Date Dec. 19, 2017, 12:10 p.m.
Message ID <differential-rev-PHID-DREV-2xd55ktugpkbt73u2f7o-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26360/
State Superseded
Headers show

Comments

phabricator - Dec. 19, 2017, 12:10 p.m.
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




To: pulkit, #hg-reviewers
Cc: mercurial-devel
phabricator - Dec. 19, 2017, 2:19 p.m.
yuja added a comment.


  This should come before https://phab.mercurial-scm.org/D1733?

REPOSITORY
  rHG Mercurial

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

To: pulkit, #hg-reviewers
Cc: yuja, mercurial-devel

Patch

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'}