phases: add a phasestr method on context
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 29 Dec 2011 04:40:09 +0100
changeset 15822 d523b6e7ad26
parent 15821 e3ee8bf5d0cc
child 15823 a1f818a2b50d
phases: add a phasestr method on context
mercurial/context.py
--- 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):