diff tests/test-command-template.t @ 29624:1a129dd05b7d stable

templatekw: fix join format of parents keyword (issue5292) Since the default joinfmt() can't process a dict of multiple keywords, we need a dedicated joinfmt for showparents(). Unlike revset(), parents are formatted as '{rev}:{node|formatnode}' by default. We copy the default formatting just like showextras() and showfilecopies() do.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 22 Jul 2016 22:12:12 +0900
parents 33bf8bd8c5b9
children 84ef4517de03
line wrap: on
line diff
--- a/tests/test-command-template.t	Fri Jul 22 22:00:46 2016 +0900
+++ b/tests/test-command-template.t	Fri Jul 22 22:12:12 2016 +0900
@@ -3438,6 +3438,16 @@
   $ hg log -R ../a -T '{join(revset("parents(%d)", rev), ", ")}\n' -r6
   4, 5
 
+on the other hand, parents are formatted as '{rev}:{node|formatnode}' by
+default. join() should agree with the default formatting:
+
+  $ hg log -R ../a -T '{join(parents, ", ")}\n' -r6
+  5:13207e5a10d9, 4:bbe44766e73d
+
+  $ hg log -R ../a -T '{join(parents, ",\n")}\n' -r6 --debug
+  5:13207e5a10d9fd28ec424934298e176197f2c67f,
+  4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
+
 Test active bookmark templating
 
   $ hg book foo