[Chandler-dev] Commits message size limits

Jared Rhine jared at wordzoo.com
Thu Nov 1 12:00:56 PDT 2007


Grant wrote:
>>> How about just omitting the diffs if they're large? People can click on
>>> the "Revision" link in the email (or,  use "svn diff" by hand).

Philippe Bossut wrote:
> +1 to Grant's suggestion if it's not too costly to implement. Who knows 
> how to do that?

The current post-commit is:

/usr/bin/svnnotify -p "$1" -r "$2" -t "commits at osafoundation.org" -f 
"svncheckin at osafoundation.org" -l /usr/bin/svnlook -P "[commits] 
($AUTHOR)" -B "http://bugzilla.osafoundation.org/show_bug.cgi?id=%s" -U 
"http://viewcvs.osafoundation.org/chandler?view=rev&rev=%s" -d -H 
HTML::ColorDiff

This could be changed to:

DODIFF=""
DIFFSIZE=$(/usr/bin/svnlook diff "$1" -r "$2" | wc -c)

[ $DIFFSIZE -gt 300000 ] && DODIFF="-d"

/usr/bin/svnnotify $DODIFF -p "$1" -r "$2" -t 
"commits at osafoundation.org" -f "svncheckin at osafoundation.org" -l 
/usr/bin/svnlook -P "[commits] ($AUTHOR)" -B 
"http://bugzilla.osafoundation.org/show_bug.cgi?id=%s" -U 
"http://viewcvs.osafoundation.org/chandler?view=rev&rev=%s" -H 
HTML::ColorDiff

-----

So run part of the process (svnlook diff) twice to first capture the 
size, and later as part of the email generation?  And then drop the diff 
switch if it's larger than 300k?

If Bear's ok with it, I think the above would do a pretty reasonable job.

-- Jared





More information about the chandler-dev mailing list