]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/RecentChanges_broken_with_empty_svnpath.mdwn
thoughts
[ikiwiki.git] / doc / bugs / RecentChanges_broken_with_empty_svnpath.mdwn
1 The [[RecentChanges]] page is broken (doesn't show any history at all) when used with an empty svnpath in the ikiwiki.setup file.
2
3 Say you have the following configuration:
4
5     rcs => "svn",
6     svnrepo => "ssh+svn://foo.bar.com/wiki",
7     svnpath => "",
8
9 In the above, $svnpath need to be either empty or "/" - both trigger the 'next unless' check in IkiWiki/Rcs/svn.pm:rcs_recentchanges() as shown in the patch below, thus causing all files to be ignored for [[RecentChanges]].
10
11 I can not see why this check is needed in the first place, so here's a patch for removing it :)
12
13     diff -upr ikiwiki-1.49.orig/IkiWiki/Rcs/svn.pm ikiwiki-1.49/IkiWiki/Rcs/svn.pm
14     --- ikiwiki-1.49.orig/IkiWiki/Rcs/svn.pm    Mon Apr 16 15:15:09 2007
15     +++ ikiwiki-1.49/IkiWiki/Rcs/svn.pm Mon Apr 16 15:15:47 2007
16     @@ -176,7 +176,6 @@ sub rcs_recentchanges ($) {
17                 }
18      
19                 foreach (keys %{$logentry->{paths}}) {
20     -                   next unless /^\/\Q$config{svnpath}\E\/([^ ]+)(?:$|\s)/;
21                         my $file=$1;
22                         my $diffurl=$config{diffurl};
23                         $diffurl=~s/\[\[file\]\]/$file/g;
24
25 > It's necessary for wikis, such as this one, that keep other things in the
26 > same svn repository. Bug [[fixed|done]]. --[[Joey]]