# HG changeset patch # User Pierre-Yves David # Date 2011-10-09 12:25:04 # Node ID 042e11c4e416e17a6de7885418562863045675c8 # Parent 405ca90df2b14c9145766d52e933d91b561efae5 phases: add a phase template keyword diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -275,6 +275,10 @@ def shownode(repo, ctx, templ, **args): """ 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 @@ keywords = { 'latesttagdistance': showlatesttagdistance, 'manifest': showmanifest, 'node': shownode, + 'phase': showphase, 'rev': showrev, 'tags': showtags, }