]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/monotone.pm
(no commit message)
[git.ikiwiki.info.git] / IkiWiki / Plugin / monotone.pm
index 38abb9a07f21a3cc53ef430a012fb0528ba841a0..c33cf7e3a0dad0c0f052400c00da2b928f8fd289 100644 (file)
@@ -68,6 +68,7 @@ sub getsetup () {
                plugin => {
                        safe => 0, # rcs plugin
                        rebuild => undef,
                plugin => {
                        safe => 0, # rcs plugin
                        rebuild => undef,
+                       section => "rcs",
                },
                mtn_wrapper => {
                        type => "string",
                },
                mtn_wrapper => {
                        type => "string",
@@ -228,7 +229,7 @@ sub read_certs ($$) {
        my @ret;
 
        my $line = $results[0];
        my @ret;
 
        my $line = $results[0];
-       while ($line =~ m/\s+key\s"(.*?)"\nsignature\s"(ok|bad|unknown)"\n\s+name\s"(.*?)"\n\s+value\s"(.*?)"\n\s+trust\s"(trusted|untrusted)"\n/sg) {
+       while ($line =~ m/\s+key\s["\[](.*?)[\]"]\nsignature\s"(ok|bad|unknown)"\n\s+name\s"(.*?)"\n\s+value\s"(.*?)"\n\s+trust\s"(trusted|untrusted)"\n/sg) {
                push @ret, {
                        key => $1,
                        signature => $2,
                push @ret, {
                        key => $1,
                        signature => $2,
@@ -558,8 +559,9 @@ sub rcs_recentchanges ($) {
                                        # from the changelog
                                        if ($cert->{key} eq $config{mtnkey}) {
                                                $committype = "web";
                                        # from the changelog
                                        if ($cert->{key} eq $config{mtnkey}) {
                                                $committype = "web";
-                                       } else {
-                                               $committype = "monotone";
+                                       }
+                                       else {
+                                               $committype = "mtn";
                                        }
                                } elsif ($cert->{name} eq "date") {
                                        $when = str2time($cert->{value}, 'UTC');
                                        }
                                } elsif ($cert->{name} eq "date") {
                                        $when = str2time($cert->{value}, 'UTC');
@@ -575,13 +577,12 @@ sub rcs_recentchanges ($) {
                }
                
                my @changed_files = get_changed_files($automator, $rev);
                }
                
                my @changed_files = get_changed_files($automator, $rev);
-               my $file;
                
                my ($out, $err) = $automator->call("parents", $rev);
                my @parents = ($out =~ m/^($sha1_pattern)$/);
                my $parent = $parents[0];
 
                
                my ($out, $err) = $automator->call("parents", $rev);
                my @parents = ($out =~ m/^($sha1_pattern)$/);
                my $parent = $parents[0];
 
-               foreach $file (@changed_files) {
+               foreach my $file (@changed_files) {
                        next unless length $file;
                        
                        if (defined $config{diffurl} and (@parents == 1)) {
                        next unless length $file;
                        
                        if (defined $config{diffurl} and (@parents == 1)) {