mercurial/templatekw.py
changeset 15823 a1f818a2b50d
parent 15422 042e11c4e416
child 15947 bdd1ed80e26e
--- a/mercurial/templatekw.py	Thu Dec 29 04:40:09 2011 +0100
+++ b/mercurial/templatekw.py	Fri Jan 06 11:20:49 2012 +0100
@@ -276,7 +276,11 @@
     return ctx.hex()
 
 def showphase(repo, ctx, templ, **args):
-    """:rev: Integer. The changeset phase."""
+    """:rev: String. The changeset phase name."""
+    return ctx.phasestr()
+
+def showphaseidx(repo, ctx, templ, **args):
+    """:rev: Integer. The changeset phase index."""
     return ctx.phase()
 
 def showrev(repo, ctx, templ, **args):
@@ -317,6 +321,7 @@
     'manifest': showmanifest,
     'node': shownode,
     'phase': showphase,
+    'phaseidx': showphaseidx,
     'rev': showrev,
     'tags': showtags,
 }