Patchwork [1,of,5] templatekw: hide help of "branches" by DEPRECATED marker

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 1, 2015, 1:38 p.m.
Message ID <c310d3303e03b338ed5a.1443706685@mimosa>
Download mbox | patch
Permalink /patch/10713/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 1, 2015, 1:38 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1443237579 -32400
#      Sat Sep 26 12:19:39 2015 +0900
# Node ID c310d3303e03b338ed5ad8c9a8254d19effc8915
# Parent  46af0adb5c375cc51ce0d29cbdcd8ba843a33425
templatekw: hide help of "branches" by DEPRECATED marker
Pierre-Yves David - Oct. 2, 2015, 7:08 p.m.
On 10/01/2015 06:38 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1443237579 -32400
> #      Sat Sep 26 12:19:39 2015 +0900
> # Node ID c310d3303e03b338ed5ad8c9a8254d19effc8915
> # Parent  46af0adb5c375cc51ce0d29cbdcd8ba843a33425
> templatekw: hide help of "branches" by DEPRECATED marker

Why are we deprecating it?
timeless - Oct. 2, 2015, 7:55 p.m.
Pierre-Yves David wrote:
>> templatekw: hide help of "branches" by DEPRECATED marker
> Why are we deprecating it?

changeset:   ...:43e872a35f8a
parent:      ...:986d09e696ff
user:        Matt Mackall <mpm@selenic.com>
date:        Thu Nov 21 11:49:31 2013 -0600
files:       mercurial/templatekw.py
description:
help: drop help for branches template keyword

The {branches} keyword dates to pre-1.0 Mercurial's tag-like branch
scheme which allowed changesets to be on multiple branches. This is
the last visible vestige of that scheme, users should instead be using
{branch}, possibly with if().
Pierre-Yves David - Oct. 2, 2015, 10:22 p.m.
On 10/02/2015 12:55 PM, timeless wrote:
> Pierre-Yves David wrote:
>>> templatekw: hide help of "branches" by DEPRECATED marker
>> Why are we deprecating it?

pushed to the clowncopter with a reference to that.

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -205,7 +205,7 @@  def showbranch(**args):
 def showbranches(**args):
     """:branches: List of strings. The name of the branch on which the
     changeset was committed. Will be empty if the branch name was
-    default.
+    default. (DEPRECATED)
     """
     branch = args['ctx'].branch()
     if branch != 'default':
@@ -502,7 +502,6 @@  dockeywords = {
     'parents': _showparents,
 }
 dockeywords.update(keywords)
-del dockeywords['branches']
 
 # tell hggettext to extract docstrings from these functions:
 i18nfunctions = dockeywords.values()