aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/cvs.pm
diff options
context:
space:
mode:
authorAmitai Schlair <schmonz@magnetic-babysitter.(none)>2009-08-22 01:25:41 -0400
committerAmitai Schlair <schmonz@magnetic-babysitter.(none)>2009-08-22 01:25:41 -0400
commit524de4db2639d37aa7049de4363c5d482cd34a0e (patch)
tree966dad995db42b4cbe9bbf0a16268d862b597fe4 /IkiWiki/Plugin/cvs.pm
parent5c0e56d149c6b33d010561f64f583e7ad1c529da (diff)
downloadikiwiki-524de4db2639d37aa7049de4363c5d482cd34a0e.tar
ikiwiki-524de4db2639d37aa7049de4363c5d482cd34a0e.tar.gz
Pass along wrapper args to ikiwiki, then handle the "cvs add dir"
case with a getopt hook directly in my plugin. If the wrapper change is safe, we won't need a wrapper wrapper.
Diffstat (limited to 'IkiWiki/Plugin/cvs.pm')
-rw-r--r--IkiWiki/Plugin/cvs.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm
index c09e4f9aa..076af26f3 100644
--- a/IkiWiki/Plugin/cvs.pm
+++ b/IkiWiki/Plugin/cvs.pm
@@ -6,6 +6,7 @@ use strict;
use IkiWiki;
sub import {
+ hook(type => "getopt", id => "cvs", call => \&getopt);
hook(type => "checkconfig", id => "cvs", call => \&checkconfig);
hook(type => "getsetup", id => "cvs", call => \&getsetup);
hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
@@ -20,6 +21,13 @@ sub import {
hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime);
}
+sub getopt () {
+ # "cvs add dir" acts immediately on the repository.
+ # post-commit gets confused by this and doesn't need to act on it.
+ # If that's why we're here, terminate the process.
+ @ARGV == 3 && $ARGV[1] eq "NONE" && $ARGV[2] eq "NONE" && exit 0;
+}
+
sub checkconfig () {
if (! defined $config{cvspath}) {
$config{cvspath}="ikiwiki";