test-template-keywords: add test for {latesttag} of wdir() revision stable
authorYuya Nishihara <yuya@tcha.org>
Sun, 20 Jan 2019 11:39:16 +0900
branchstable
changeset 41299 ff1222a7d714
parent 41298 88a7c211b21e
child 41300 66102f6fa10a
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.
tests/test-template-keywords.t
--- a/tests/test-template-keywords.t	Fri Jan 18 23:32:26 2019 -0800
+++ b/tests/test-template-keywords.t	Sun Jan 20 11:39:16 2019 +0900
@@ -1056,6 +1056,31 @@
   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: