hidden: Add ``hidden`` method for context
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 16 Jun 2011 01:57:59 +0200
changeset 14644 f3a40fd7008c
parent 14643 7e295dd10d40
child 14645 e4cfdff6d3f4
hidden: Add ``hidden`` method for context
mercurial/context.py
--- a/mercurial/context.py	Thu Jun 16 01:57:53 2011 +0200
+++ b/mercurial/context.py	Thu Jun 16 01:57:59 2011 +0200
@@ -116,6 +116,8 @@
         return self._repo.nodetags(self._node)
     def bookmarks(self):
         return self._repo.nodebookmarks(self._node)
+    def hidden(self):
+        return self._rev in self._repo.changelog.hiddenrevs
 
     def parents(self):
         """return contexts for each parent changeset"""