Author: metze Date: 2004-08-04 12:33:42 +0000 (Wed, 04 Aug 2004) New Revision: 183 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba-docs&path=/&rev=183&nolog=1 Log: try to add the diff output of 100 lines into the commit mail
metze Modified: hooks/commit-email.pl Changeset: Modified: hooks/commit-email.pl =================================================================== --- hooks/commit-email.pl 2004-08-04 11:54:32 UTC (rev 182) +++ hooks/commit-email.pl 2004-08-04 12:33:42 UTC (rev 183) @@ -51,6 +51,11 @@ # in the log and email messages by not printing the file, then set # $no_diff_deleted to 1. my $no_diff_deleted = 0; +my @difflines = &read_from_process($svnlook, 'diff', $repos, + '-r', $rev, @no_diff_deleted); +# Maximum number of lines to display in a diff. If there are more +# than this many lines, don't include a diff at all. +my $max_difflines = 100; # Since the path to svnlook depends upon the local installation # preferences, check that the required programs exist to insure that @@ -356,6 +361,9 @@ push(@body, "Modified:\n"); push(@body, map { " $_\n" } @mods); } +if ($#difflines <= $max_difflines) { + push(@body, map { /[\r\n]+$/ ? $_ : "$_\n" } @difflines); +}; # Go through each project and see if there are any matches for this # project. If so, send the log out.