Patchwork [6,of,7,Series-A] context: retrieve hidden from filteredrevs

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 7, 2013, 6:30 p.m.
Message ID <b9cf7f963542657e622b.1357583438@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/494/
State Accepted
Commit 3f1552c6bf714aafc6cca56d6224ae638213da83
Headers show

Comments

Pierre-Yves David - Jan. 7, 2013, 6:30 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1357235476 -3600
# Node ID b9cf7f963542657e622b4e4b08651598838b2b9c
# Parent  51bdd7bbd106d8a30acac288cdb9e75e531c9b25
context: retrieve hidden from filteredrevs

This prepare the dropping of the repo.hiddenrevs property

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -10,10 +10,11 @@  from i18n import _
 import ancestor, mdiff, error, util, scmutil, subrepo, patch, encoding, phases
 import copies
 import match as matchmod
 import os, errno, stat
 import obsolete as obsmod
+import repoview
 
 propertycache = util.propertycache
 
 class changectx(object):
     """A changecontext object makes access to data related to a particular
@@ -209,11 +210,11 @@  class changectx(object):
     def phasestr(self):
         return phases.phasenames[self.phase()]
     def mutable(self):
         return self.phase() > phases.public
     def hidden(self):
-        return self._rev in self._repo.hiddenrevs
+        return self._rev in repoview.filteredrevs(self._repo, 'hidden')
 
     def parents(self):
         """return contexts for each parent changeset"""
         return self._parents