[PATCH 1 of 3 STABLE] test-template-keywords: add test for {latesttag} of wdir() revision

Yuya Nishihara yuya at tcha.org
Sun Jan 20 03:11:09 UTC 2019


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1547951956 -32400
#      Sun Jan 20 11:39:16 2019 +0900
# Branch stable
# Node ID ff1222a7d714304b49b555ed779b2aadae5b1827
# Parent  88a7c211b21e98e543af4dbe88a48a0d4f55549f
test-template-keywords: add test for {latesttag} of wdir() revision

It's probably broken since fb672eac2702, "templatekw: choose {latesttag}
by len(changes), not date (issue5659)". only() doesn't support wdir.

diff --git a/tests/test-template-keywords.t b/tests/test-template-keywords.t
--- a/tests/test-template-keywords.t
+++ b/tests/test-template-keywords.t
@@ -1056,6 +1056,31 @@ Merged tag overrides:
   o  0: null+1,1
   
 
+Tags of working-directory parents (issue6055):
+
+  $ hg update -q 3
+  $ echo a > head3
+  $ hg ci -qAm h3a
+  $ hg merge -q 2
+  $ hg log -Gr'::wdir()' -T "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
+  hg: parse error: invalid argument for revspec
+  [255]
+
+  $ hg ci -m merge
+  $ hg log -Gr'::.' -T "{rev}: {latesttag % '{tag}+{distance},{changes} '}\n"
+  @    13: at3+2,3 t3+2,3
+  |\
+  | o  12: at3+1,1 t3+1,1
+  | |
+  | o  3: at3+0,0 t3+0,0
+  | |
+  o |  2: t2+0,0
+  |/
+  o  1: t1+0,0
+  |
+  o  0: null+1,1
+  
+
   $ cd ..
 
 Set up repository containing template fragments in commit metadata:


More information about the Mercurial-devel mailing list