[PATCH 04 of 12] phases: add a phase method to context

pierre-yves.david at logilab.fr pierre-yves.david at logilab.fr
Tue Oct 18 12:27:01 CDT 2011

# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1318955153 -7200
# Node ID 1b70b32f8fa33c37bbf34e0eee53313af66598a5
# Parent  d8381a929be96f1320becc6b05a68a043900b420
phases: add a phase method to context

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -115,10 +115,12 @@ class changectx(object):
         return self._changeset[5]
     def tags(self):
         return self._repo.nodetags(self._node)
     def bookmarks(self):
         return self._repo.nodebookmarks(self._node)
+    def phase(self):
+        return self._repo._phaserev[self._rev]
     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