Author: metze Date: 2004-08-18 06:35:49 +0000 (Wed, 18 Aug 2004) New Revision: 28
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=lorikeet&path=/&rev=28&nolog=1 Log: - we now have 250 lines of inline diff - we no longer have the repos name hardcoded in the WebSVN link metze Modified: hooks/commit-email.pl Changeset: Modified: hooks/commit-email.pl =================================================================== --- hooks/commit-email.pl 2004-08-08 19:17:53 UTC (rev 27) +++ hooks/commit-email.pl 2004-08-18 06:35:49 UTC (rev 28) @@ -35,6 +35,7 @@ } use strict; +use File::Basename; use Carp; ###################################################################### @@ -54,7 +55,7 @@ # 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; +my $max_difflines = 250; # Since the path to svnlook depends upon the local installation # preferences, check that the required programs exist to insure that @@ -337,11 +338,15 @@ # Assembly of log message. # Put together the body of the log message. +my $repname = basename($repos); +my $websvn_link = "WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=$repname\&path=/$commondir\&rev=$rev\&nolog=1\n"; my @body; push(@body, "Author: $author\n"); push(@body, "Date: $date\n"); push(@body, "New Revision: $rev\n"); -push(@body, "WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=lorikeet\&path=/$commondir\&rev=$rev\&nolog=1\n"); +push(@body, "\n"); +push(@body, $websvn_link); +push(@body, "\n"); push(@body, "Log:\n"); push(@body, @log); if (@adds) @@ -362,11 +367,12 @@ push(@body, "Modified:\n"); push(@body, map { " $_\n" } @mods); } -push(@body, "\nChangeset:\n"); +push(@body, "\n\nChangeset:\n"); if ($#difflines <= $max_difflines) { push(@body, map { /[\r\n]+$/ ? $_ : "$_\n" } @difflines); } else { - push(@body, "Sorry the patch is to large, please use WebSVN to see it!\n"); + push(@body, "Sorry, the patch is too large (".$#difflines." lines) to include; please use WebSVN to see it!\n"); + push(@body, $websvn_link); }; # Go through each project and see if there are any matches for this
