phases: add a phase template keyword
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sun, 09 Oct 2011 14:25:04 +0200
changeset 15422 042e11c4e416
parent 15421 405ca90df2b1
child 15423 ea5b346024e1
phases: add a phase template keyword
mercurial/templatekw.py
--- a/mercurial/templatekw.py	Tue Oct 18 18:25:53 2011 +0200
+++ b/mercurial/templatekw.py	Sun Oct 09 14:25:04 2011 +0200
@@ -275,6 +275,10 @@
     """
     return ctx.hex()
 
+def showphase(repo, ctx, templ, **args):
+    """:rev: Integer. The changeset phase."""
+    return ctx.phase()
+
 def showrev(repo, ctx, templ, **args):
     """:rev: Integer. The repository-local changeset revision number."""
     return ctx.rev()
@@ -312,6 +316,7 @@
     'latesttagdistance': showlatesttagdistance,
     'manifest': showmanifest,
     'node': shownode,
+    'phase': showphase,
     'rev': showrev,
     'tags': showtags,
 }