X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/9ef4b5e677919f95dd2aa08ca51a0313c6c5542d..475b4199e1624350b928a002fe83033ee3389b31:/IkiWiki/Plugin/cvs.pm diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index 4543489a6..360d97249 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -1,7 +1,7 @@ -#!/usr/pkg/bin/perl +#!/usr/bin/perl package IkiWiki::Plugin::cvs; -# Copyright (c) 2008 Amitai Schlair +# Copyright (c) 2009 Amitai Schlair # All rights reserved. # # This code is derived from software contributed to ikiwiki @@ -49,6 +49,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 genwrapper () { @@ -85,6 +86,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, cvsrepo => { type => "string", @@ -322,7 +324,7 @@ sub rcs_recentchanges($) { eval q{use File::ReadBackwards}; error($@) if $@; - my (undef, $tmpfile) = tempfile(OPEN=>0); + my ($tmphandle, $tmpfile) = tempfile(); system("env TZ=UTC cvsps -q --cvs-direct -z 30 -x >$tmpfile"); if ($? == -1) { error "couldn't run cvsps: $!\n"; @@ -484,4 +486,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for cvs\n"; # TODO +} + 1