Patchwork [4,of,4] templatekw: deprecate p1rev/p2rev/p1node/p2node in favor of p1/p2

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 2, 2018, 1:18 p.m.
Message ID <50c57f7f27b047e8f60d.1541164719@mimosa>
Download mbox | patch
Permalink /patch/36338/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 2, 2018, 1:18 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1540557997 -32400
#      Fri Oct 26 21:46:37 2018 +0900
# Node ID 50c57f7f27b047e8f60d7e2b1a18b0da392c5db9
# Parent  cd356034a839f6cfd0e64c894d9696e79e3c25f7
templatekw: deprecate p1rev/p2rev/p1node/p2node in favor of p1/p2
Augie Fackler - Nov. 2, 2018, 7:03 p.m.
On Fri, Nov 02, 2018 at 10:18:39PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1540557997 -32400
> #      Fri Oct 26 21:46:37 2018 +0900
> # Node ID 50c57f7f27b047e8f60d7e2b1a18b0da392c5db9
> # Parent  cd356034a839f6cfd0e64c894d9696e79e3c25f7
> templatekw: deprecate p1rev/p2rev/p1node/p2node in favor of p1/p2

queued, thanks

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -708,14 +708,14 @@  def showp2(context, mapping):
 @templatekeyword('p1rev', requires={'ctx'})
 def showp1rev(context, mapping):
     """Integer. The repository-local revision number of the changeset's
-    first parent, or -1 if the changeset has no parents."""
+    first parent, or -1 if the changeset has no parents. (DEPRECATED)"""
     ctx = context.resource(mapping, 'ctx')
     return ctx.p1().rev()
 
 @templatekeyword('p2rev', requires={'ctx'})
 def showp2rev(context, mapping):
     """Integer. The repository-local revision number of the changeset's
-    second parent, or -1 if the changeset has no second parent."""
+    second parent, or -1 if the changeset has no second parent. (DEPRECATED)"""
     ctx = context.resource(mapping, 'ctx')
     return ctx.p2().rev()
 
@@ -723,7 +723,7 @@  def showp2rev(context, mapping):
 def showp1node(context, mapping):
     """String. The identification hash of the changeset's first parent,
     as a 40 digit hexadecimal string. If the changeset has no parents, all
-    digits are 0."""
+    digits are 0. (DEPRECATED)"""
     ctx = context.resource(mapping, 'ctx')
     return ctx.p1().hex()
 
@@ -731,7 +731,7 @@  def showp1node(context, mapping):
 def showp2node(context, mapping):
     """String. The identification hash of the changeset's second
     parent, as a 40 digit hexadecimal string. If the changeset has no second
-    parent, all digits are 0."""
+    parent, all digits are 0. (DEPRECATED)"""
     ctx = context.resource(mapping, 'ctx')
     return ctx.p2().hex()