]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/darcs.pm
moved non-openid signin form into same page as openid selector; show/hide as buttons...
[ikiwiki.git] / IkiWiki / Plugin / darcs.pm
index 0d68f27e5874b3331cbab851b1dafdfa06d21673..f17fadcb10ef5a66b5530ae6d65d41b175a186b7 100644 (file)
@@ -18,6 +18,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 silentsystem (@) {
@@ -51,7 +52,7 @@ sub darcs_info ($$$) {
        return $_;
 }
 
-sub file_in_vc($$) {
+sub file_in_vc ($$) {
        my $repodir = shift;
        my $file = shift;
 
@@ -62,14 +63,14 @@ sub file_in_vc($$) {
        }
        my $found=0;
        while (<DARCS_MANIFEST>) {
-               $found = 1, last if /^(\.\/)?$file$/;
+               $found = 1 if /^(\.\/)?$file$/;
        }
        close(DARCS_MANIFEST) or error("'darcs query manifest' exited " . $?);
 
        return $found;
 }
 
-sub darcs_rev($) {
+sub darcs_rev ($) {
        my $file = shift; # Relative to the repodir.
        my $repodir = $config{srcdir};
 
@@ -78,7 +79,7 @@ sub darcs_rev($) {
        return defined $hash ? $hash : "";
 }
 
-sub checkconfig() {
+sub checkconfig () {
        if (defined $config{darcs_wrapper} && length $config{darcs_wrapper}) {
                push @{$config{wrappers}}, {
                        wrapper => $config{darcs_wrapper},
@@ -87,11 +88,12 @@ sub checkconfig() {
        }
 }
 
-sub getsetup() {
+sub getsetup () {
        return
                plugin => {
                        safe => 0, # rcs plugin
                        rebuild => undef,
+                       section => "rcs",
                },
                darcs_wrapper => {
                        type => "string",
@@ -237,7 +239,7 @@ sub rcs_commit ($$$;$$) {
        }
 }
 
-sub rcs_commit_staged($$$) {
+sub rcs_commit_staged ($$$) {
        my ($message, $user, $ipaddr) = @_;
 
        my $author;
@@ -426,4 +428,8 @@ sub rcs_getctime ($) {
        return $date;
 }
 
+sub rcs_getmtime ($) {
+       error "rcs_getmtime is not implemented for darcs\n"; # TODO
+}
+
 1