From 98ae5a15da8223f4a2952d9aad94c7dc1708e6cc Mon Sep 17 00:00:00 2001 From: Djoume Date: Wed, 8 Jul 2009 12:46:47 -0400 Subject: added web file rename when using svn bug --- ...a_the_web_is_failing_when_using_subversion.mdwn | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn (limited to 'doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn') diff --git a/doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn b/doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn new file mode 100644 index 000000000..4f2257891 --- /dev/null +++ b/doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn @@ -0,0 +1,24 @@ +I'm using ikiwiki 3.12 on Mac OS X (installed via mac ports) + +When trying to rename a file via the web interface (using the rename plugin) I get the following error: + +Error: Undefined subroutine &IkiWiki::Plugin::svn::dirname called at /opt/local/lib/perl5/vendor_perl/5.8.9/IkiWiki/Plugin/svn.pm line 246. + +Applying the following patch fixed it: + + --- IkiWiki/Plugin/svn.pm.orig 2009-07-08 12:25:23.000000000 -0400 + +++ IkiWiki/Plugin/svn.pm 2009-07-08 12:28:36.000000000 -0400 + @@ -243,10 +243,10 @@ + + if (-d "$config{srcdir}/.svn") { + # Add parent directory for $dest + - my $parent=dirname($dest); + + my $parent=IkiWiki::dirname($dest); + if (! -d "$config{srcdir}/$parent/.svn") { + while (! -d "$config{srcdir}/$parent/.svn") { + - $parent=dirname($dest); + + $parent=Ikiwiki::dirname($dest); + } + if (system("svn", "add", "--quiet", "$config{srcdir}/$parent") != 0) { + warn("svn add $parent failed\n"); + -- cgit v1.2.3 From 0c6a47e9e4c6a5508868b730bed0ac2d0c358ae4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 8 Jul 2009 13:13:23 -0400 Subject: svn: Fix rcs_rename to properly scope call to dirname. --- IkiWiki/Plugin/svn.pm | 4 ++-- debian/changelog | 6 ++++++ ...enaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn') diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index fe55e7d08..06b987f51 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -243,10 +243,10 @@ sub rcs_rename ($$) { if (-d "$config{srcdir}/.svn") { # Add parent directory for $dest - my $parent=dirname($dest); + my $parent=IkiWiki::dirname($dest); if (! -d "$config{srcdir}/$parent/.svn") { while (! -d "$config{srcdir}/$parent/.svn") { - $parent=dirname($dest); + $parent=IkiWiki::dirname($dest); } if (system("svn", "add", "--quiet", "$config{srcdir}/$parent") != 0) { warn("svn add $parent failed\n"); diff --git a/debian/changelog b/debian/changelog index 239b22b42..e83e570d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ikiwiki (3.1416) UNRELEASED; urgency=low + + * svn: Fix rcs_rename to properly scope call to dirname. + + -- Joey Hess Wed, 08 Jul 2009 13:10:38 -0400 + ikiwiki (3.1415) unstable; urgency=low * img: Fix extra double quote with alt text. (smcv) diff --git a/doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn b/doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn index 4f2257891..1a737df0a 100644 --- a/doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn +++ b/doc/bugs/Renaming_a_file_via_the_web_is_failing_when_using_subversion.mdwn @@ -22,3 +22,7 @@ Applying the following patch fixed it: if (system("svn", "add", "--quiet", "$config{srcdir}/$parent") != 0) { warn("svn add $parent failed\n"); + +> Thank you very much for the patch, which I've applied. I wonder how +> that snuck in (aside from the obvious, that the svn plugin is not often +> used and the code was added w/o being tested..). [[done]] --[[Joey]] -- cgit v1.2.3