Or, for further SVN_EDITOR comfort (e.g. properly linking to the TFS work item in the case of having to use SvnBridge), one could store the following script as ~/bin/svn_editor :
#!/bin/sh
template_file="${@}"
template_file_new="${template_file}.new"
current_work_item_number_file="${HOME}/tfs_work_item_number_current.txt"
[ -f "${current_work_item_number_file}" ] && work_item=$(cat "${current_work_item_number_file}") || work_item="please fill in!"
# Yes folks, this is the TFS convention (hard, NOT-TO-BE-ALTERED text)
# to properly link to work items via SvnBridge commits!
work_item_prefix_hard_tfs_convention_text="work item: "
work_item_text="${work_item_prefix_hard_tfs_convention_text}${work_item}"
custom_text="${work_item_text}\n\n[this addition above initially placed to ignored content part here,\nto ensure properly abortable empty message by default - please move it to active content as needed]"
sed -e 's/\(will be ignored--\)/\1\n'"${custom_text}"'/' "${template_file}" > "${template_file_new}"
mv -f "${template_file_new}" "${template_file}"
$EDITOR "${@}"
and then simply do
export SVN_EDITOR=~/bin/svn_editor
in ~/.bashrc or some such.
Bonus points for keeping the work item number file updated even from the current work item page as viewed in Firefox TFS web interface (I think there possibly is a way to communicate with Firefox to get page titles etc.).
Or simply have this script start a first initial editor run on the persistent work item file and then let it do the second editor run on the customized commit template.