Patchwork [1,of,3] help: hide phaseidx template keyword

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 2, 2017, 1:33 p.m.
Message ID <a19232e55e7c0838299d.1509629604@mimosa>
Download mbox | patch
Permalink /patch/25345/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 2, 2017, 1:33 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1508573104 -32400
#      Sat Oct 21 17:05:04 2017 +0900
# Node ID a19232e55e7c0838299dbd1dfd93207b24a02f39
# Parent  6798568fe43dc1e28a0c66c54217b563e1f2d5de
help: hide phaseidx template keyword

I don't think it's great idea to expose the internal representation of phases.
Let's discourage use of the phaseidx keyword.

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -816,7 +816,7 @@  def showphase(repo, ctx, templ, **args):
 
 @templatekeyword('phaseidx')
 def showphaseidx(repo, ctx, templ, **args):
-    """Integer. The changeset phase index."""
+    """Integer. The changeset phase index. (ADVANCED)"""
     return ctx.phase()
 
 @templatekeyword('rev')