diff tests/test-template-keywords.t @ 39368:5b1d406b39f1

templatekw: alias {name} of file copies dict to {path} For the same reason as the previous patch. We might want some hack to support {source.path}, {source.rev}, etc., but that's a different issue.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 05 Aug 2018 16:27:09 +0900
parents 83f8f7b9fa60
children 918944f53aac
line wrap: on
line diff
--- a/tests/test-template-keywords.t	Sun Aug 05 16:14:18 2018 +0900
+++ b/tests/test-template-keywords.t	Sun Aug 05 16:27:09 2018 +0900
@@ -769,6 +769,24 @@
   fourth
   third
 
+Test file copies dict:
+
+  $ hg log -r8 -T '{join(file_copies, " ")}\n'
+  fourth (second)
+  $ hg log -r8 -T '{file_copies % "{name} <- {source}\n"}'
+  fourth <- second
+  $ hg log -r8 -T '{file_copies % "{path} <- {source}\n"}'
+  fourth <- second
+
+  $ hg log -r8 -T '{join(file_copies_switch, " ")}\n'
+  
+  $ hg log -r8 -C -T '{join(file_copies_switch, " ")}\n'
+  fourth (second)
+  $ hg log -r8 -C -T '{file_copies_switch % "{name} <- {source}\n"}'
+  fourth <- second
+  $ hg log -r8 -C -T '{file_copies_switch % "{path} <- {source}\n"}'
+  fourth <- second
+
 Test index keyword:
 
   $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n'