X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/efcbb32f7c54ad8ffa2e56d52e651c18bd8be55a..f9b87a9f8b498f3a41614b159dcb278024be70dd:/IkiWiki/Plugin/monotone.pm diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index bdc6ee786..3a8b267a3 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -55,7 +55,7 @@ sub checkconfig () { #{{{ error("Monotone version too old, is $version but required 0.38"); } - if (length $config{mtn_wrapper}) { + if (defined $config{mtn_wrapper} && length $config{mtn_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{mtn_wrapper}, wrappermode => (defined $config{mtn_wrappermode} ? $config{mtn_wrappermode} : "06755"), @@ -65,6 +65,10 @@ sub checkconfig () { #{{{ sub getsetup () { #{{{ return + plugin => { + safe => 0, # rcs plugin + rebuild => undef, + }, mtn_wrapper => { type => "string", example => "/srv/mtn/wiki/_MTN/ikiwiki-netsync-hook", @@ -521,13 +525,12 @@ sub rcs_recentchanges ($) { #{{{ my $child = open(MTNLOG, "-|"); if (! $child) { exec("mtn", "log", "--root=$config{mtnrootdir}", "--no-graph", - "--brief") || error("mtn log failed to run"); + "--brief", "--last=$num") || error("mtn log failed to run"); } - while (($num >= 0) and (my $line = )) { + while (my $line = ) { if ($line =~ m/^($sha1_pattern)/) { push @revs, $1; - $num -= 1; } } close MTNLOG || debug("mtn log exited $?");