aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-SVN-Web
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2009-12-20 12:48:15 +0000
committerRong-En Fan <rafan@FreeBSD.org>2009-12-20 12:48:15 +0000
commit73df9cc270455b6756ca214c1a012ccb0ca1ddc2 (patch)
treea67ee153ab9c70362da235c86a0ccf19c908129d /devel/p5-SVN-Web
parenta9003d466886b69b1df4c531bad1925b2cf03148 (diff)
downloadports-73df9cc270455b6756ca214c1a012ccb0ca1ddc2.tar.gz
ports-73df9cc270455b6756ca214c1a012ccb0ca1ddc2.zip
- Fix assertion failed (*path != '/') for SVN 1.5 and above
PR: ports/141778 Submitted by: Bernhard Froehlich <decke at bluelife.at> Obtained from: CPAN RT Bug# 37388 [1] [1] http://rt.cpan.org/Public/Bug/Display.html?id=37388#txn-543810
Notes
Notes: svn path=/head/; revision=246291
Diffstat (limited to 'devel/p5-SVN-Web')
-rw-r--r--devel/p5-SVN-Web/Makefile2
-rw-r--r--devel/p5-SVN-Web/files/patch-2basic.t12
-rw-r--r--devel/p5-SVN-Web/files/patch-Diff.pm21
-rw-r--r--devel/p5-SVN-Web/files/patch-Log.pm18
-rw-r--r--devel/p5-SVN-Web/files/patch-Revision.pm4
-rw-r--r--devel/p5-SVN-Web/files/patch-View.pm11
-rw-r--r--devel/p5-SVN-Web/files/patch-action.pm24
7 files changed, 51 insertions, 41 deletions
diff --git a/devel/p5-SVN-Web/Makefile b/devel/p5-SVN-Web/Makefile
index a1086b83d9d1..0a850d14df71 100644
--- a/devel/p5-SVN-Web/Makefile
+++ b/devel/p5-SVN-Web/Makefile
@@ -7,7 +7,7 @@
PORTNAME= SVN-Web
PORTVERSION= 0.53
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
diff --git a/devel/p5-SVN-Web/files/patch-2basic.t b/devel/p5-SVN-Web/files/patch-2basic.t
new file mode 100644
index 000000000000..daa78083fa03
--- /dev/null
+++ b/devel/p5-SVN-Web/files/patch-2basic.t
@@ -0,0 +1,12 @@
+--- t/2basic.t Sun Apr 29 23:22:51 2007
++++ t/2basic.t Mon Dec 15 03:09:45 2008
+@@ -61,6 +61,9 @@
+ # a ':'. This catches template bugs with too many slashes.
+ unlike($mech->uri(), qr{(?<!:)//}, 'URI does not contain "//"');
+
++ diag('skip static files checks in local tests: '.$mech->uri), return
++ if $mech->uri->path eq '/' or $mech->uri->path =~ m{/css/};
++
+ $mech->content_unlike(qr'An error occured', ' and content was correct');
+ if($can_tidy
+ and ($mech->uri() !~ m{ (?:
diff --git a/devel/p5-SVN-Web/files/patch-Diff.pm b/devel/p5-SVN-Web/files/patch-Diff.pm
index 04294bbbed5e..61c32898da50 100644
--- a/devel/p5-SVN-Web/files/patch-Diff.pm
+++ b/devel/p5-SVN-Web/files/patch-Diff.pm
@@ -1,28 +1,21 @@
---- lib/SVN/Web/Diff.pm.orig 2007-04-30 03:22:51.000000000 +0800
-+++ lib/SVN/Web/Diff.pm 2009-04-21 18:06:59.000000000 +0800
-@@ -188,8 +188,11 @@
+--- lib/SVN/Web/Diff.pm Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/Diff.pm Mon Dec 15 02:30:36 2008
+@@ -188,8 +188,8 @@
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) );
++ my %types = ( $rev1 => $ra->check_path($self->rpath, $rev1),
++ $rev2 => $ra->check_path($self->rpath, $rev2) );
SVN::Web::X->throw(error => '(cannot diff nodes of different types: %1 %2 %3)',
vars => [$path, $rev1, $rev2])
-@@ -299,7 +302,10 @@
+@@ -299,7 +299,7 @@
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) {
++ if($ra->check_path($self->rpath($path), $rev) == $SVN::Node::none) {
SVN::Web::X->throw(
error => '(path %1 does not exist in revision %2)',
- vars => [$path, $rev],
diff --git a/devel/p5-SVN-Web/files/patch-Log.pm b/devel/p5-SVN-Web/files/patch-Log.pm
index 466eb69055cd..25eb0aa73483 100644
--- a/devel/p5-SVN-Web/files/patch-Log.pm
+++ b/devel/p5-SVN-Web/files/patch-Log.pm
@@ -1,22 +1,20 @@
---- lib/SVN/Web/Log.pm.org 2008-07-17 11:23:59.000000000 +0900
-+++ lib/SVN/Web/Log.pm 2008-07-17 11:27:14.000000000 +0900
-@@ -214,7 +214,10 @@
+--- lib/SVN/Web/Log.pm Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/Log.pm Mon Dec 15 02:32:02 2008
+@@ -214,7 +215,7 @@
# entries then we're on the last page.
#
# If we're not on the last page then pop off the extra log entry
- $ra->get_log([$path], $rev, 1, $limit + 1, 1, 1,
-+ my $path_getlog = $path;
-+ if ($path_getlog eq "/") {$path_getlog = "";}
-+ $path_getlog =~ s/^\///;
-+ $ra->get_log([$path_getlog], $rev, 1, $limit + 1, 1, 1,
++ $ra->get_log([$self->rpath], $rev, 1, $limit + 1, 1, 1,
sub { $self->_log(@_) });
$at_oldest = @{ $self->{REVS} } <= $limit;
-@@ -222,6 +225,7 @@
+@@ -222,7 +223,7 @@
pop @{ $self->{REVS} } unless $at_oldest;
} else {
# We must be displaying to the oldest rev, so no paging required
-+ if($path eq "/") {$path = "";}
- $ra->get_log([$path], $rev, 1, $limit, 1, 1,
+- $ra->get_log([$path], $rev, 1, $limit, 1, 1,
++ $ra->get_log([$self->rpath], $rev, 1, $limit, 1, 1,
sub { $self->_log(@_) });
+ $at_oldest = 1;
diff --git a/devel/p5-SVN-Web/files/patch-Revision.pm b/devel/p5-SVN-Web/files/patch-Revision.pm
index 6af094322762..c008f7d1d6c1 100644
--- a/devel/p5-SVN-Web/files/patch-Revision.pm
+++ b/devel/p5-SVN-Web/files/patch-Revision.pm
@@ -1,5 +1,5 @@
---- lib/SVN/Web/Revision.pm.org 2008-07-17 11:24:07.000000000 +0900
-+++ lib/SVN/Web/Revision.pm 2008-07-17 11:24:50.000000000 +0900
+--- lib/SVN/Web/Revision.pm Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/Revision.pm Sun Dec 14 00:25:26 2008
@@ -211,7 +211,7 @@
)
if $rev > $yrev;
diff --git a/devel/p5-SVN-Web/files/patch-View.pm b/devel/p5-SVN-Web/files/patch-View.pm
index 9662d261e8f5..ca8150cfb040 100644
--- a/devel/p5-SVN-Web/files/patch-View.pm
+++ b/devel/p5-SVN-Web/files/patch-View.pm
@@ -1,14 +1,11 @@
---- lib/SVN/Web/View.pm.org 2008-07-17 11:24:12.000000000 +0900
-+++ lib/SVN/Web/View.pm 2008-07-17 11:24:53.000000000 +0900
-@@ -134,7 +134,10 @@
+--- lib/SVN/Web/View.pm Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/View.pm Mon Dec 15 02:29:44 2008
+@@ -134,7 +134,7 @@
my $rev = $act_rev;
# Get the log for this revision of the file
- $ra->get_log([$path], $rev, $rev, 1, 1, 1,
-+ my $path_getlog = $path;
-+ if ($path_getlog eq "/") {$path_getlog = "";}
-+ $path_getlog =~ s/^\///;
-+ $ra->get_log([$path_getlog], $rev, $rev, 1, 1, 1,
++ $ra->get_log([$self->rpath], $rev, $rev, 1, 1, 1,
sub { $self->{REV} = $self->_log(@_) });
# Get the text for this revision of the file
diff --git a/devel/p5-SVN-Web/files/patch-action.pm b/devel/p5-SVN-Web/files/patch-action.pm
index 0b45cf0879b1..9a3527044a87 100644
--- a/devel/p5-SVN-Web/files/patch-action.pm
+++ b/devel/p5-SVN-Web/files/patch-action.pm
@@ -1,14 +1,24 @@
---- lib/SVN/Web/action.pm.org 2008-07-17 11:24:18.000000000 +0900
-+++ lib/SVN/Web/action.pm 2008-07-17 11:24:57.000000000 +0900
-@@ -241,7 +241,10 @@
+--- lib/SVN/Web/action.pm Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/action.pm Mon Dec 15 02:27:15 2008
+@@ -241,7 +241,7 @@
my $ra = $self->{repos}{ra};
my @log_result;
- $ra->get_log([$path], $rev, 1, 1, 0, 1,
-+ my $path_getlog = $path;
-+ if ($path_getlog eq "/") {$path_getlog = "";}
-+ $path_getlog =~ s/^\///;
-+ $ra->get_log([$path_getlog], $rev, 1, 1, 0, 1,
++ $ra->get_log([$self->rpath($path)], $rev, 1, 1, 0, 1,
sub { @log_result = @_; });
return @log_result if wantarray();
+@@ -371,5 +371,12 @@
+ See L<http://www.perl.com/perl/misc/Artistic.html>
+
+ =cut
++
++sub rpath {
++ my ($self,$p) = @_;
++ my $path = $p || $self->{path};
++ $path =~ s{^/}{} if $path;
++ return $path;
++}
+
+ 1;