D1761: scmutil: use a tuple of possible values instead of using startswith()

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Dec 26 19:16:29 UTC 2017


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch also adds a review comment which is helpful as inline comment.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1319,7 +1319,7 @@
                                                      'directaccess'):
         return repo
 
-    if not repo.filtername.startswith('visible'):
+    if not repo.filtername in ('visible', 'visible-hidden'):
         return repo
 
     symbols = set()
@@ -1345,6 +1345,8 @@
         repo.ui.warn(_("warning: accessing hidden changesets for write "
                        "operation: %s\n") % revstr)
 
+    # we have to use new filtername to separate branch/tags cache until we can
+    # disbale these cache when revisions are dynamically pinned.
     return repo.filtered('visible-hidden', revs)
 
 def _getrevsfromsymbols(repo, symbols):



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


More information about the Mercurial-devel mailing list