[PATCH 5 of 6 phases] phases: add a phase template keyword

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Nov 4 04:02:33 CDT 2011


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1318163104 -7200
# Node ID 51e52382a663e50ba0c8aa1bf152d77adb814d12
# Parent  f85b6adf69c33cd97b04b11291fbe9bf2c7a8b05
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 @@
     """
     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,
 }


More information about the Mercurial-devel mailing list