]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/bzr.pm
Merge commit 'upstream/master'
[git.ikiwiki.info.git] / IkiWiki / Plugin / bzr.pm
index 39227cbae4f07f773ce8461fffe0d4b8a3b63442..1054f5b3e3f0be1c39e3865fc0a8b90b80ae2b74 100644 (file)
@@ -23,9 +23,6 @@ sub import { #{{{
 } #}}}
 
 sub checkconfig () { #{{{
 } #}}}
 
 sub checkconfig () { #{{{
-       if (! defined $config{diffurl}) {
-               $config{diffurl}="";
-       }
        if (defined $config{bzr_wrapper} && length $config{bzr_wrapper}) {
                push @{$config{wrappers}}, {
                        wrapper => $config{bzr_wrapper},
        if (defined $config{bzr_wrapper} && length $config{bzr_wrapper}) {
                push @{$config{wrappers}}, {
                        wrapper => $config{bzr_wrapper},
@@ -36,10 +33,14 @@ sub checkconfig () { #{{{
 
 sub getsetup () { #{{{
        return
 
 sub getsetup () { #{{{
        return
+               plugin => {
+                       safe => 0, # rcs plugin
+                       rebuild => undef,
+               },
                bzr_wrapper => {
                        type => "string",
                        #example => "", # FIXME add example
                bzr_wrapper => {
                        type => "string",
                        #example => "", # FIXME add example
-                       description => "bzr post-commit executable to generate",
+                       description => "bzr post-commit hook to generate",
                        safe => 0, # file
                        rebuild => 0,
                },
                        safe => 0, # file
                        rebuild => 0,
                },
@@ -225,7 +226,7 @@ sub rcs_recentchanges ($) { #{{{
                        # Skip source name in renames
                        $filename =~ s/^.* => //;
 
                        # Skip source name in renames
                        $filename =~ s/^.* => //;
 
-                       my $diffurl = $config{'diffurl'};
+                       my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : "";
                        $diffurl =~ s/\[\[file\]\]/$filename/go;
                        $diffurl =~ s/\[\[file-id\]\]/$fileid/go;
                        $diffurl =~ s/\[\[r2\]\]/$info->{revno}/go;
                        $diffurl =~ s/\[\[file\]\]/$filename/go;
                        $diffurl =~ s/\[\[file-id\]\]/$fileid/go;
                        $diffurl =~ s/\[\[r2\]\]/$info->{revno}/go;
@@ -245,7 +246,7 @@ sub rcs_recentchanges ($) { #{{{
                        rev        => $info->{"revno"},
                        user       => $user,
                        committype => "bzr",
                        rev        => $info->{"revno"},
                        user       => $user,
                        committype => "bzr",
-                       when       => time - str2time($info->{"timestamp"}),
+                       when       => str2time($info->{"timestamp"}),
                        message    => [@message],
                        pages      => [@pages],
                };
                        message    => [@message],
                        pages      => [@pages],
                };