Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2009 16:04:50 GMT
From:      Will Bond <will@imarc.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/133877: Diff view of devel/p5-SVN-Web does not work with subversion 1.5.0
Message-ID:  <200904201604.n3KG4ogH098085@www.freebsd.org>
Resent-Message-ID: <200904201610.n3KGA5IW041484@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         133877
>Category:       ports
>Synopsis:       Diff view of devel/p5-SVN-Web does not work with subversion 1.5.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 20 16:10:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Will Bond
>Release:        7.0-RELEASE
>Organization:
iMarc
>Environment:
FreeBSD internal.example.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
When trying to view the HTML or Text diff of a file via SVN::Web the page returns a 500 Internal Server Error. The apache error log includes:

svn: In file 'subversion/libsvn_ra/ra_loader.c' line 778

It looks like all of the rest of the SVN 1.5 changes were fixes in the last patch, but this one was missed. I found the difference by looking at the patch from http://rt.cpan.org/Public/Bug/Display.html?id=37388.
>How-To-Repeat:
Browse to an individual file in SVN::Web with more than one revision, click "View Revision Log" and then click either "HTML" or "TEXT" in the Diff column.
>Fix:


Patch attached with submission follows:

diff -Nuarb SVN-Web-0.53/lib/SVN/Web/Diff.pm SVN-Web-0.53/lib/SVN/Web/Diff.pm.new
--- SVN-Web-0.53/lib/SVN/Web/Diff.pm    2007-04-29 15:22:51.000000000 -0400
+++ SVN-Web-0.53/lib/SVN/Web/Diff.pm.new        2009-04-20 11:38:45.000000000 -0400
@@ -188,8 +188,11 @@

     my $mime = $self->{cgi}->param('mime') || 'text/html';

-    my %types = ( $rev1 => $ra->check_path($path, $rev1),
-                 $rev2 => $ra->check_path($path, $rev2) );
+    my $path_getlog = $path;
+    if ($path_getlog eq "/") {$path_getlog = "";}
+    $path_getlog =~ s/^\///;
+    my %types = ( $rev1 => $ra->check_path($path_getlog, $rev1),
+                 $rev2 => $ra->check_path($path_getlog, $rev2) );

     SVN::Web::X->throw(error => '(cannot diff nodes of different types: %1 %2 %3)',
                       vars  => [$path, $rev1, $rev2])
@@ -299,7 +302,10 @@

     my $ra   = $self->{repos}{ra};

-    if($ra->check_path($path, $rev) == $SVN::Node::none) {
+    my $path_getlog = $path;
+    if ($path_getlog eq "/") {$path_getlog = "";}
+    $path_getlog =~ s/^\///;
+    if($ra->check_path($path_getlog, $rev) == $SVN::Node::none) {
        SVN::Web::X->throw(
            error => '(path %1 does not exist in revision %2)',
             vars  => [$path, $rev],

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904201604.n3KG4ogH098085>