Patchwork D1731: repoview: introduce function to add visibility exceptions

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

Comments

phabricator - Dec. 19, 2017, 12:09 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We need to call self.invalidatevolatilesets() to clear filteredrevcache to make
  sure next time visibility exceptions are taken in consideration while computing
  and we don't get a old cached value.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/repoview.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -236,6 +236,10 @@ 
             return self
         return self.unfiltered().filtered(name)
 
+    def addvisibilityexceptions(self, revs):
+        filtertable[self.filtername][1].update(revs)
+        self.invalidatevolatilesets()
+
     def __repr__(self):
         return r'<%s:%s %r>' % (self.__class__.__name__,
                                 pycompat.sysstr(self.filtername),