#!/bin/sh## SVN_EDITOR script#[ $# -eq 1 ] || { echo "usage: $0 file" exit 1}file=$1ed=$VISUAL[ -z $ed ] && ed=$EDITOR[ -z $ed ] && ed=vicat <<ENDTEMPLATE >$file.$Feature :BugID :Author :Reviewer :Description :Changed List :ENDTEMPLATEcat $file >>$file.$sum=`cksum $file.$`if $ed $file.$; then newsum=`cksum $file.$` if [ "$newsum" != "$sum" ]; then rm -f $file mv $file.$ $file else rm -f $file.$ fielse echo "editor \"$ed\" failed" exit 1fi
Save the preceding script :~ /. Subversion/svn-log.template and Set permissions:
Chmod + x ~ /. Subversion/svn-log.template
In. bashrc, set:
Export svn_editor =/home/<user>/. Subversion/svn-log.template
Then execute
Source ~ /. Bashrc
Do not restart to make the settings take effect.
In this way, the following template will pop up each time you checkin:
Feature: bugid: Author: reviewer: Description: changed list: -- this row and the following content will be ignored -- M src/COM/spare/pinyin. Java