SVN::Web, remote repos redux, and syntax highlighting

nik on 2006-10-15T09:50:57

On 8th September I wrote about adding support to SVN::Web for browsing repositories hosted remotely.

As I said at the time,

Also, it only seems to work for file:/// and svn:// URIs at the moment.

j2kaddict suggested that I look at using SVN::Client rather than SVN::Ra, so I've been doing that off and in my spare time.

I've finally tracked down the last of the memory allocation errors (SVN::*'s integration with Subversion's memory allocation routines requires more thought than is typically required with Perl) and now have something that's nearer release, on the svn-client branch.

This has slowed down some operations, but sped up others. For example, carrying out diffs (and viewing everything that's changed in a particular revision) is now much faster, as the diffing is carried out by the Subversion libs, instead of using Text::Diff.

The tradeoff is that some features have currently fallen by the wayside. For example, the diff output is currently raw, and not nicely highlighted.

Which brings me on to my next investigation -- I need to find a decent mechanism for doing syntax highlighting with Perl.

I've looked at Syntax::Highlight::Engine::Kate, but it looks as though if I want to change the look of the highlighting I need to subclass a bunch of modules, which is effort I'd like to avoid if possible.

Syntax::Highlight::Universal looks interesting, but doesn't build on my local FreeBSD box. That doesn't bode well for it being easy to install for people who are going to be using my code that depends on it. It also looks like it introduces a dependency on Java, which is a bit heavier than I really want.


Text::VimColor?

Aristotle on 2006-10-15T16:11:56

Not sure how feasible its use is in your case, but I always use that and never had a complaint.

try the patch from rt

mpeters on 2006-11-01T14:40:19

I tried out Syntax::Highlight::Universal and had build problems as well. There's a patch on RT that fixes it - http://rt.cpan.org/Public/Bug/Display.html?id=13662

The colorer library seems to be pretty nice and cover a lot of ground. It would be nice if the Perl interface were better maintained.