зеркало из https://github.com/mono/svn-tools.git
2004-11-11 Ben Maurer <bmaurer@ximian.com>
* svnci: This is a script that does a commit with the right log message. Thanks to Todd for his input on this script. svn path=/trunk/svn-tools/; revision=36027
This commit is contained in:
Коммит
7f6ba92658
|
@ -0,0 +1,5 @@
|
|||
2004-11-11 Ben Maurer <bmaurer@ximian.com>
|
||||
|
||||
* svnci: This is a script that does a commit with the right log
|
||||
message. Thanks to Todd for his input on this script.
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
FILES=$@
|
||||
|
||||
echo "Creating commit message..."
|
||||
|
||||
MSG=`mktemp`
|
||||
|
||||
svn di $FILES | filterdiff -i*ChangeLog | grep '^[+]' | grep -v '^[+][+]' | sed s/^[+]// > $MSG
|
||||
|
||||
cat $MSG
|
||||
|
||||
echo About to commit
|
||||
svn st $FILES
|
||||
|
||||
while [[ 1 ]]
|
||||
do
|
||||
|
||||
read -a RESPONSE -p"Would you like to continue (Y)es/(N)o/(E)dit Message: "
|
||||
if [[ $? != 0 ]]
|
||||
then
|
||||
RESPONSE="N"
|
||||
fi
|
||||
|
||||
case $RESPONSE in
|
||||
"Y" | "y" | "yes" | "Yes")
|
||||
|
||||
echo "Comitting..."
|
||||
svn ci -F $MSG $FILES
|
||||
rm $MSG
|
||||
exit 0
|
||||
;;
|
||||
|
||||
"N" | "n" | "no" | "No")
|
||||
echo "Aborting..."
|
||||
rm $MSG
|
||||
exit 1
|
||||
;;
|
||||
|
||||
"E" | "e" | "ed" | "Ed" | "Edit" | "edit")
|
||||
vi $MSG
|
||||
# try again
|
||||
;;
|
||||
*)
|
||||
# try again
|
||||
;;
|
||||
esac
|
||||
done
|
Загрузка…
Ссылка в новой задаче