Update ChangeSubject velocity template to use Velocity 1.7 syntax

Brackets after an expression in Velocity 1.7 get translated to
calls to a .get(Integer) method, so it is no longer legal to write
$somevar[i] and expect it to translate to somevarvalue[i]. Instead you
must write ${somevar}[i].

The symptom is that
$projectName.replaceAll('/.*/', '...')[$branch.shortName] is left
as is in the subject line of outgoing mail instead of being replaced
by the project and branch name.

Change-Id: I6210ea17dd6f43532ff3b291667015c74555e07b
This commit is contained in:
Jonathan Nieder
2014-05-09 18:49:46 -07:00
parent a11a60d199
commit 1a596630f5

View File

@@ -34,4 +34,4 @@
#macro(ellipsis $length $str)
#if($str.length() > $length)#set($length = $length - 3)${str.substring(0,$length)}...#else$str#end
#end
Change in $projectName.replaceAll('/.*/', '...')[$branch.shortName]: #ellipsis(63, $change.subject)
Change in ${projectName.replaceAll('/.*/', '...')}[$branch.shortName]: #ellipsis(63, $change.subject)