[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Log message format

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-11-20 18:44:50 CET

Rodolfo Schulz de Lima wrote:
> On Wed, Nov 19, 2003 at 04:41:52PM -0600, Ben Collins-Sussman wrote:
>
>>They're all hand-written, part of our project's policy.
>>
>>However, many of us use an emacs function to help create these sorts of
>>log messages as we work. It's really nice. See svn-log-message in
>>/trunk/tools/dev/svn-dev.el
>
> Nice. The only bad think is that I'm vi-addicted :( (or :), dunno)

I use Vim, and I use this little script to prepare an approximate log message template ready for me to fill in the descriptions:

~> cat ~/bin/svnlogmsg
#!/bin/bash
# Write a log message template, listing the files that would be committed.
FILES=`svn st "$@" | grep "^[^?]" | sed 's/^M......//' | sort`
echo
for FILE in $FILES; do
  echo "* $FILE"
  svn diff --diff-cmd diff -x -up $FILE | sed -e "s/^@@ [^@]* @@ \(.*\)\> *(.*$/ (\1): /" -e "t" -e "d" | uniq
done
echo
svn diff -x -up "$@"

I use it like this:
~> svnlogmsg [Files/Directories to be committed] > logmsg.txt
~> vim logmsg.txt

and it produces the formatted list of file names and function names (to the extent that "diff -p" can guess them), followed by a diff for me to look at, which I delete afterwards.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 20 18:43:02 2003

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.