Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the SVN-Notify CPAN distribution.

Report information
The Basics
Id: 25070
Status: resolved
Priority: 0/
Queue: SVN-Notify

People
Owner: Nobody in particular
Requestors: robmoore [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.57
Fixed in: 2.67



Subject: max-diff-length parameter does not work with Alternative handler
The plain text component of the message is truncated but the html component is not (I'm using alternative parameter 'HTML::ColorDiff'). As a result, I'm still getting email messages that are crippling in size.
On Wed Feb 21 17:06:53 2007, robmoore wrote: Show quoted text
> The plain text component of the message is truncated but the html > component is not (I'm using alternative parameter 'HTML::ColorDiff'). As > a result, I'm still getting email messages that are crippling in size.
Fixed in svn, thanks for the report. Watch for a new version in the next few days. Best, David
From: mrm-bitcard [...] mceachen.us
On Mon Mar 26 23:09:38 2007, DWHEELER wrote: Show quoted text
> On Wed Feb 21 17:06:53 2007, robmoore wrote:
> > The plain text component of the message is truncated but the html > > component is not (I'm using alternative parameter 'HTML::ColorDiff'). As > > a result, I'm still getting email messages that are crippling in size.
> Fixed in svn, thanks for the report. Watch for a new version in the next > few days. > > Best, > > David
David, it seems that this bug should be addressed in 2.65, but the HTML still doesn't respect the --max-diff-length. Thanks for your work on this module, BTW. It's pretty slick!
Subject: PATCH: Adds support to max-diff-length for Alternative and HTML::ColorDiff
From: mrm-bitcard [...] mceachen.us
On Wed Apr 11 15:58:13 2007, mrm wrote: Show quoted text
> On Mon Mar 26 23:09:38 2007, DWHEELER wrote:
> > On Wed Feb 21 17:06:53 2007, robmoore wrote:
> > > The plain text component of the message is truncated but the html > > > component is not (I'm using alternative parameter 'HTML::ColorDiff').
I found that, for version 2.65, the HTML handler worked correctly, but that the HTML::ColorDiff didn't respect the max_diff_length. I added that support in this patch. I ran diff from the SVN/Notify/HTML directory using 2.65 sources. Thanks! -- Matthew
diff -Naur HTML-2.65/ColorDiff.pm HTML/ColorDiff.pm --- HTML-2.65/ColorDiff.pm 2007-04-11 13:23:24.000000000 -0700 +++ HTML/ColorDiff.pm 2007-04-11 13:30:46.000000000 -0700 @@ -110,11 +110,16 @@ my $in_div; my $in_span = ''; print $out qq{</div>\n<div id="patch">\n<h3>Diff</h3>\n}; - my %seen; + my ($length, %seen) = 0; + my $max = $self->max_diff_length; while (my $line = <$diff>) { $line =~ s/[\n\r]+$//; next unless $line; - if ($line =~ /^(Modified|Added|Deleted|Copied): (.*)/) { + if ($max && ($length += length($line)) >= $max) { + print $out + "\n<strong>Diff output has been truncated at $max characters.</strong>\n"; + last; + } elsif ($line =~ /^(Modified|Added|Deleted|Copied): (.*)/) { my $class = $types{my $action = $1}; ++$seen{$2}; my $file = encode_entities($2, '<>&"');
From: robmoore [...] yahoo.com
On Wed Apr 11 16:39:32 2007, mrm wrote: Show quoted text
> On Wed Apr 11 15:58:13 2007, mrm wrote:
> > On Mon Mar 26 23:09:38 2007, DWHEELER wrote:
> > > On Wed Feb 21 17:06:53 2007, robmoore wrote:
> > > > The plain text component of the message is truncated but the html > > > > component is not (I'm using alternative parameter
'HTML::ColorDiff'). Show quoted text
> > I found that, for version 2.65, the HTML handler worked correctly, but > that the HTML::ColorDiff didn't respect the max_diff_length. > > I added that support in this patch. I ran diff from the SVN/Notify/HTML > directory using 2.65 sources. > > Thanks!
I noticed a new release but could not find any mention of this patch being applied. Since I use HTML::ColorDiff (and I use a Debian package that comes from the releases) I'd appreciate having this in the next release if possible. Thanks, Rob
Subject: Re: [rt.cpan.org #25070] max-diff-length parameter does not work with Alternative handler
Date: Sun, 8 Jul 2007 09:43:34 -0700
To: bug-SVN-Notify [...] rt.cpan.org
From: "David E. Wheeler" <david [...] kineticode.com>
On Jul 5, 2007, at 07:56, Rob Moore via RT wrote: Show quoted text
> I noticed a new release but could not find any mention of this patch > being applied. Since I use HTML::ColorDiff (and I use a Debian package > that comes from the releases) I'd appreciate having this in the next > release if possible.
Sorry, that was a rushed release to fix a bug that broke SVN::Notify::Mirror. I will review your patch before the next release, I promise. Best, David
On Wed Apr 11 16:39:32 2007, mrm wrote: Show quoted text
> I found that, for version 2.65, the HTML handler worked correctly, but > that the HTML::ColorDiff didn't respect the max_diff_length. > > I added that support in this patch. I ran diff from the SVN/Notify/HTML > directory using 2.65 sources.
Finally got around to applying this. The patch was almost exactly right. :-) Matt, send me your full name so I can credit you in the Changes file, would you? If you guys want to try it out, grab it from svn: svn co https://svn.kineticode.com/SVN-Notify/trunk SVN-Notify Thanks, David