X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2a15f9415979e809ef332bdcffa83ff168d5bbef..54f600af14bf6dc067ffc30ec6f22d517001fe99:/IkiWiki/Plugin/bzr.pm diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 7eb5cfe93..f79ca7c8f 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -83,15 +84,13 @@ sub bzr_log ($) { } elsif ($line =~ /^(modified|added|renamed|renamed and modified|removed):/) { $key = "files"; - unless (defined($info{$key})) { $info{$key} = ""; } + $info{$key} = "" unless defined $info{$key}; } elsif (defined($key) and $line =~ /^ (.*)/) { $info{$key} .= "$1\n"; } elsif ($line eq "------------------------------------------------------------\n") { - if (keys %info) { - push (@infos, {%info}); - } + push @infos, {%info} if keys %info; %info = (); $key = undef; } @@ -108,6 +107,7 @@ sub bzr_log ($) { } } close $out; + push @infos, {%info} if keys %info; return @infos; } @@ -307,4 +307,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for bzr\n"; # TODO +} + 1