[PATCH 2 of 3] hidden: Add ``hidden`` method for context

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Jun 15 19:01:08 CDT 2011


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1308182279 -7200
# Node ID 1efefc4bf735471e5999b72f93996c270305e24f
# Parent  896e1d977d399afecc6f3a4c4f1fa57a3b59f411
hidden: Add ``hidden`` method for context

diff -r 896e1d977d39 -r 1efefc4bf735 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"""


More information about the Mercurial-devel mailing list