aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Wrapper.pm
diff options
context:
space:
mode:
authorAmitai Schlair <schmonz@magnetic-babysitter.(none)>2009-08-23 18:25:02 -0400
committerAmitai Schlair <schmonz@magnetic-babysitter.(none)>2009-08-23 18:25:02 -0400
commit5da229aa51adcec27b109ebe2e696f7426cbd781 (patch)
tree411840beca1e22a5036f3b648df6f22dc2371df1 /IkiWiki/Wrapper.pm
parent607534cecc7ab1bfefd1df1bfe19e4d7c338029b (diff)
downloadikiwiki-5da229aa51adcec27b109ebe2e696f7426cbd781.tar
ikiwiki-5da229aa51adcec27b109ebe2e696f7426cbd781.tar.gz
Instead of passing the args through the wrapper so the CVS plugin
can evaluate them, check them in the wrapper right off the bat. This doesn't prevent the deadlock in web commits that need to cvs add directories, but I'm committing so Joey can take a look if he wants.
Diffstat (limited to 'IkiWiki/Wrapper.pm')
-rw-r--r--IkiWiki/Wrapper.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
index 4d92716ff..2354717c3 100644
--- a/IkiWiki/Wrapper.pm
+++ b/IkiWiki/Wrapper.pm
@@ -44,6 +44,17 @@ EOF
$test_receive=IkiWiki::Receive::gen_wrapper();
}
+ my $check_cvs_add_dir="";
+ # XXX conditionalize on $config{rcs} eq 'cvs'
+ $check_cvs_add_dir=<<"EOF";
+ {
+ int j;
+ for (j = 1; j < argc; j++)
+ if (strcmp(argv[j], "New directory") == 0)
+ exit(0);
+ }
+EOF
+
my $check_commit_hook="";
my $pre_exec="";
if ($config{post_commit}) {
@@ -119,6 +130,7 @@ addenv(char *var, char *val) {
int main (int argc, char **argv) {
char *s;
+$check_cvs_add_dir
$check_commit_hook
$test_receive
$envsave
@@ -139,7 +151,7 @@ $envsave
}
$pre_exec
- execv("$this", argv);
+ execl("$this", "$this", NULL);
perror("exec $this");
exit(1);
}