[PATCH 5 of 9 phases] phases: add a phasestr method on context
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sun Jan 8 09:30:58 CST 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1325130009 -3600
# Node ID 1a1f11bbce5b1441cf76ac0af9f6be94132c0e7b
# Parent b150eced1acf3e04c32457c78eab73f72b2263a1
phases: add a phasestr method on context
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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):
More information about the Mercurial-devel
mailing list