Skip Menu |

This queue is for tickets about the activitymail CPAN distribution.

Report information
The Basics
Id: 18092
Status: resolved
Priority: 0/
Queue: activitymail

People
Owner: Nobody in particular
Requestors: gpavlov [...] mynewplace.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.24



Subject: -w and -V option issues (and suggested fixes)
Date: Thu, 9 Mar 2006 21:14:23 -0800
To: <bug-activitymail [...] rt.cpan.org>
From: "George Pavlov" <gpavlov [...] mynewplace.com>
David, I just started using activity mail and mostly love it, except for a couple of little things: 1. it does not seem to handle files with spaces and other funny characters in them when creating an HTML link to the file (in ViewCVS/ViewVC) with the -w option. My simplistic way of fixing it was to add this line in the two appropriate places (right after $url is declared) -- not sure if this covers all inappropriate characters (it does cover the ones in my repository): $url =~ s/([() &])/sprintf("%%%02X", ord($1))/seg; 2. when the -V option is used the script appends the following to the file name in the url it composes: ".diff?r1=1.1&r2=1.2". I am not sure the ".diff" part is necessary -- in ViewVC either works fine. The problem is that if the ".diff" is present all further links on the ViewVC page fail with Python errors. For example the "revision log" link becomes ...filename.java.diff?view=log#rev1.2, which is NOT valid. This might have something to do with a change of behavior in ViewVC (I am running last night's build, version 1.0), but since dropping the ".diff" works just as well for the diff page maybe that is a better way to go? Thanks for a very useful piece of code! George
Subject: Re: [rt.cpan.org #18092] -w and -V option issues (and suggested fixes)
Date: Fri, 10 Mar 2006 13:08:47 -0800
To: bug-activitymail [...] rt.cpan.org
From: David Wheeler <david [...] kineticode.com>
On Mar 9, 2006, at 21:14, George Pavlov via RT wrote: Show quoted text
> 1. it does not seem to handle files with spaces and other funny > characters in them when creating an HTML link to the file (in > ViewCVS/ViewVC) with the -w option. My simplistic way of fixing it was > to add this line in the two appropriate places (right after $url is > declared) -- not sure if this covers all inappropriate characters (it > does cover the ones in my repository): > > $url =~ s/([() &])/sprintf("%%%02X", ord($1))/seg;
Try the attached patch. Show quoted text
> 2. when the -V option is used the script appends the following to the > file name in the url it composes: ".diff?r1=1.1&r2=1.2". I am not sure > the ".diff" part is necessary -- in ViewVC either works fine. The > problem is that if the ".diff" is present all further links on the > ViewVC page fail with Python errors. For example the "revision log" > link > becomes ...filename.java.diff?view=log#rev1.2, which is NOT valid. > This > might have something to do with a change of behavior in ViewVC (I am > running last night's build, version 1.0), but since dropping the > ".diff" > works just as well for the diff page maybe that is a better way to go?
Well, it was designed for CVSWeb, not ViewCVS/ViewVC. If CVSWeb doesn't need the '.diff', either, then I'm fine to drop it. I honestly don't know, since I haven't used CVS or CVSWeb in years (I'm on Subversion now). Show quoted text
> Thanks for a very useful piece of code!
Glad you like it. Best, David

Message body is not shown because sender requested not to inline it.

Subject: RE: [rt.cpan.org #18092] -w and -V option issues (and suggested fixes)
Date: Fri, 10 Mar 2006 14:47:20 -0800
To: <bug-activitymail [...] rt.cpan.org>
From: "George Pavlov" <gpavlov [...] mynewplace.com>
Show quoted text
> > $url =~ s/([() &])/sprintf("%%%02X", ord($1))/seg;
> > Try the attached patch.
Did not work for me (now email messages appear without the "Modified Files" section altogether). I am not a PERL expert so will refrain from trying to suggest fixes and for now will stick with my simplistic search/replace approach. Also, shouldn't any escaping happen in both the plain text and the html-formatted emails? Show quoted text
> Well, it was designed for CVSWeb, not ViewCVS/ViewVC. If CVSWeb > doesn't need the '.diff', either, then I'm fine to drop it. I > honestly don't know, since I haven't used CVS or CVSWeb in > years (I'm on Subversion now).
No experience with CVSWeb. A quick check of a random CVSWeb repository seems to suggest that it does. Both of these URLs seem to work: http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/.cvsignore.diff?r1=1.11;r2=1 .12 http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/.cvsignore?r1=1.11;r2=1.12
Subject: Re: [rt.cpan.org #18092] -w and -V option issues (and suggested fixes)
Date: Fri, 10 Mar 2006 15:01:45 -0800
To: bug-activitymail [...] rt.cpan.org
From: David Wheeler <david [...] kineticode.com>
On Mar 10, 2006, at 14:47, George Pavlov via RT wrote: Show quoted text
> Did not work for me (now email messages appear without the "Modified > Files" section altogether).
Huh. That makes no sense. Do you have URI::Escape installed? Did you apply the patch against activitymail 1.23? Show quoted text
> I am not a PERL expert so will refrain from > trying to suggest fixes and for now will stick with my simplistic > search/replace approach. Also, shouldn't any escaping happen in > both the > plain text and the html-formatted emails?
Yes. I forgot that the URLs were created in different sections. Would you try again? I've attached a complete script instead of a patch. Show quoted text
> No experience with CVSWeb. A quick check of a random CVSWeb repository > seems to suggest that it does. Both of these URLs seem to work: > > http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/.cvsignore.diff? > r1=1.11;r2=1 > .12 > http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/.cvsignore? > r1=1.11;r2=1.12
Cool, thanks, I'll drop it, then. Best, David
Download activitymail
application/octet-stream 51.1k

Message body not shown because it is not plain text.

I added calls to HTML::Entities::encode_entities() in the appropriate places, and dropped the extra stuff from the CVSWeb URL as discussed. Changes in 1.24. Thanks!