]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - ikiwiki
recentchanges
[git.ikiwiki.info.git] / ikiwiki
diff --git a/ikiwiki b/ikiwiki
index 1159ce769b821c3e9a417b7f6646e956dfa71421..42a0ef3ba935e357d6706fd3da6623d28ff4ba3a 100755 (executable)
--- a/ikiwiki
+++ b/ikiwiki
@@ -373,15 +373,13 @@ sub rcs_recentchanges ($) {
        eval q{use Date::Parse};
        eval q{use Time::Duration};
        
        eval q{use Date::Parse};
        eval q{use Time::Duration};
        
-       my %sourcepages=reverse %pagesources;
-       
        if (-d "$srcdir/.svn") {
                my $info=`LANG=C svn info $srcdir`;
                my ($svn_url)=$info=~/^URL: (.*)$/m;
 
        if (-d "$srcdir/.svn") {
                my $info=`LANG=C svn info $srcdir`;
                my ($svn_url)=$info=~/^URL: (.*)$/m;
 
-               # FIXME: currently assumes that the wiki is under trunk in
-               # svn.
-               my ($svn_base)=$svn_url=~m!(/trunk/.*)!;
+               # FIXME: currently assumes that the wiki is somewhere
+               # under trunk in svn, doesn't support other layouts.
+               my ($svn_base)=$svn_url=~m!(/trunk(?:/.*)?)$!;
                
                my $div=qr/^--------------------+$/;
                my $infoline=qr/^r(\d+)\s+\|\s+([^\s]+)\s+\|\s+(\d+-\d+-\d+\s+\d+:\d+:\d+\s+[-+]?\d+).*/;
                
                my $div=qr/^--------------------+$/;
                my $infoline=qr/^r(\d+)\s+\|\s+([^\s]+)\s+\|\s+(\d+-\d+-\d+\s+\d+:\d+:\d+\s+[-+]?\d+).*/;
@@ -397,8 +395,8 @@ sub rcs_recentchanges ($) {
                                $user=$2;
                                $when=concise(ago(time - str2time($3)));
                        }
                                $user=$2;
                                $when=concise(ago(time - str2time($3)));
                        }
-                       elsif ($state eq 'header' && /^\s+[A-Z]\s+\Q$svn_base\E(.*)/) {
-                               push @pages, $sourcepages{$1};
+                       elsif ($state eq 'header' && /^\s+[A-Z]\s+\Q$svn_base\E\/(.+)$/) {
+                               push @pages, pagename($1);
                        }
                        elsif ($state eq 'header' && /^$/) {
                                $state='body';
                        }
                        elsif ($state eq 'header' && /^$/) {
                                $state='body';