I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-01-12 21:44:25-08 by stugots
I'm getting HTML formatted e-mail, but without any colors

Svnnotify's commit e-mails don't generate color diffs for me. The mail body is HTML-formatted, but the diffs looks like normal diffs... I.e., the removed and added rows have - and + in the left column, but there's no color.

I'd appreciate any pointers for where I should look to find out what's broken. I followed all the rules when installing it (I swear!) but I must have done something wrong.

Here's the environment:

The server's running Ubuntu Hardy, with the latest package versions.

Svn is version 1.4.6, installed from Hardy packages.

Perl is v5.8.8.

Svnnotify is SVN-Notify-2.78, downloaded from CPAN. The installation was: perl Makefile.PL, make, make test, make install. I didn't see any obviously bad errors during the installation.

/var/lib/svn/dev/hooks/post-commit does this:

svnnotify --repos-path "$REPOS" --revision "$REV" --to commit-watchers --user-domain fsci.com --subject-prefix "[SVN COMMIT]" --handler HTML::ColorDiff -d

Thanks!

Direct Responses: 9713 | Write a response
Posted on 2009-01-13 02:45:53-08 by theory in response to 9712
Re: I'm getting HTML formatted e-mail, but without any colors

It looks right to me. Can you look at the raw text of the email and see if you can see markup in the diff section of the message like in this page if you view its source?

--Theory

Direct Responses: 9721 | Write a response
Posted on 2009-01-13 16:08:42-08 by stugots in response to 9713
Re: I'm getting HTML formatted e-mail, but without any colors

Some progress --

@theory: I compared it to the page you cited, and the style tag etc. look the same.

I neglected to say that I'm on a Mac, and I'm running MS Entourage 2008...

I tried this: I saved an svnnotify e-mail to disk, and looked at it in Preview. No change, it was still just black and white text. But then I changed the file extension to .html, opened it again in Preview and -presto- the colors appear!

So, the message contains the right markup. But Entourage doesn't want to display it.

I checked the MIME type of the message I saved to disk, both before and after changing the file extension. It's "message/rfc822." I pawed through Entourage settings, and didn't find anything appropriate. It's set up for HTML e-mail, and I can receive messages with color text correctly.

So something is making Entourage ignore certain markup tags in svnnotify's e-mail. Are there useful svnnotify options that I should try? I'm also going to search for bug reports/complaints about Entourage's handling of HTML e-mail, and see if I can find anything useful.

Direct Responses: 9727 | Write a response
Posted on 2009-01-13 21:24:50-08 by theory in response to 9721
Re: I'm getting HTML formatted e-mail, but without any colors

Oh, Entourage. It likely use's Word's HTML display engine. So all bets are off. There are no switches to help, but if you figure out how to get Entourage to properly display the results of the CSS, you can write a filter to modify SVN::Notify's output just for Entourage. See SVN::Notify::Filter for details on filter creation.

--Theory

Direct Responses: 9728 | Write a response
Posted on 2009-01-14 16:05:29-08 by stugots in response to 9727
Re: I'm getting HTML formatted e-mail, but without any colors

Resolution: Yep, it's Entourage's HTML rendering engine. Ick. The HTML messages it creates aren't anywhere near valid markup. To call Entourage's HTML generation a subset of the HTML spec would be technically correct, but maybe a bit generous. :-)

I'm sure they had good reasons for this... The Entourage documentation mentions providing sufficient HTML support for "messaging" but not for creating "full websites." Whatever, it is what it is...

A suggestion for the SVN-Notify documentation: Consider adding a table of known good & bad e-mail client HTML rendering. At least in the context of SVN-Notify generated e-mail. If, for example, Entourage sucks, Outlook sucks less, and Thunderbird works great with svnnotify's e-mail, that would be good for future svnnotify users to know.

Thank you for the swift and helpful responses! I'm not going to try writing a filter for Entourage -- when Snow Leopard comes out, we might solve this by all of us switching to Mac Mail. (Assuming, that is, SL's Mac Mail doesn't have similar limitations.)

John

Direct Responses: 9731 | Write a response
Posted on 2009-01-14 20:41:03-08 by theory in response to 9728
Re: I'm getting HTML formatted e-mail, but without any colors

I've used SVN::Notify with Mac Mail for years without a problem, so no worries there, I think.

--Theory

Direct Responses: Write a response