#!/bin/bash
# Write a log message template, listing the files that would be committed.
FILES=`svn st "$@" | grep "^[^?]" | grep -v "^  L" | sed 's/^.......//' | sort`
echo
for FILE in $FILES; do
  echo "* $FILE"
  # Find the names of the functions affected, and list them in parentheses.
  svn diff --diff-cmd diff -x '-U0 -p' $FILE | sed -e "s/^@@ [^@]* @@ .*\<\([A-Za-z_][A-Za-z0-9_]*\) *(.*/  (\1): /" -e "t" -e "d" | uniq
  echo
done
# (when in sorted order) svn diff -x -up "$@"
for FILE in $FILES; do
  svn diff --diff-cmd diff -x -up $FILE
done


