changeset 35499:b55a142f00c5

scmutil: use a tuple of possible values instead of using startswith() This patch also adds a review comment which is helpful as inline comment. Differential Revision: https://phab.mercurial-scm.org/D1761
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 26 Dec 2017 22:56:07 +0530
parents dfaf9f10e2e5
children 87918218da70
files mercurial/scmutil.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon Dec 25 22:56:59 2017 +0900
+++ b/mercurial/scmutil.py	Tue Dec 26 22:56:07 2017 +0530
@@ -1319,7 +1319,7 @@
                                                      'directaccess'):
         return repo
 
-    if not repo.filtername.startswith('visible'):
+    if repo.filtername not 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):