changeset 15822:d523b6e7ad26

phases: add a phasestr method on context
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 29 Dec 2011 04:40:09 +0100
parents e3ee8bf5d0cc
children a1f818a2b50d
files mercurial/context.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Jan 04 01:02:16 2012 +0100
+++ b/mercurial/context.py	Thu Dec 29 04:40:09 2011 +0100
@@ -124,6 +124,8 @@
             # outdated cache
             del self._repo._phaserev
         return self._repo._phaserev[self._rev]
+    def phasestr(self):
+        return phases.phasenames[self.phase()]
     def mutable(self):
         return self._repo._phaserev[self._rev] > phases.public
     def hidden(self):