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

commit-email.pl: max_diff_lines

From: Vitor Angelo <vangelo_at_gmail.com>
Date: 2005-11-01 14:46:57 CET

Hi,

maybe this is useful for somebody: add a configuration to
commit-email.pl that prints
only a line "Diff omitted." if the diff is too long.

Regards,

Vitor.

Diff against 1.2.3:

58a59,61
> # Commit diff will only be sent if the number of lines is below this
> # value. To disable the check, and always send the diff, set to 0.
> my $max_diff_lines = 1000;
375c378,387
< push(@body, map { /[\r\n]+$/ ? $_ : "$_\n" } @difflines);

---
> my $difflines_len = scalar(@difflines);
> push(@body, "Diff: $difflines_len lines\n\n");
> if (($max_diff_lines == 0) || ($difflines_len <= $max_diff_lines))
>   {
>     push(@body, map { /[\r\n]+$/ ? $_ : "$_\n" } @difflines);
>   }
> else
>   {
>     push(@body, "Diff omitted.\n");
>   }
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 1 23:37:15 2005

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