]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/monotone.pm
update
[git.ikiwiki.info.git] / IkiWiki / Plugin / monotone.pm
index 05c5a514dc3f22c6b58de298b007c16a9208d89f..67d4abbaaed4792a35fc405eee55506a669a4018 100644 (file)
@@ -23,6 +23,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_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 () {
 }
 
 sub checkconfig () {
@@ -68,6 +69,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 +230,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,7 +560,8 @@ 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 {
+                                       }
+                                       else {
                                                $committype = "mtn";
                                        }
                                } elsif ($cert->{name} eq "date") {
                                                $committype = "mtn";
                                        }
                                } elsif ($cert->{name} eq "date") {
@@ -691,4 +694,8 @@ sub rcs_getctime ($) {
        return $date;
 }
 
        return $date;
 }
 
+sub rcs_getmtime ($) {
+       error "rcs_getmtime is not implemented for monotone\n"; # TODO
+}
+
 1
 1