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;
- # 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+).*/;
$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';