]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' of git://github.com/joeyh/ikiwiki
authorAmitai Schlair <schmonz@magnetic-babysitter.(none)>
Thu, 10 Sep 2009 19:03:18 +0000 (15:03 -0400)
committerAmitai Schlair <schmonz@magnetic-babysitter.(none)>
Thu, 10 Sep 2009 19:03:18 +0000 (15:03 -0400)
1  2 
IkiWiki.pm
IkiWiki/Wrapper.pm

diff --combined IkiWiki.pm
index 48780ae51d137fd20aba4f369817c93762035bb6,187d40a3aa7107df352080a7c9811d574628d852..85d8eea68419cb350e530c322958796186e05b1f
@@@ -344,7 -344,7 +344,7 @@@ sub getsetup () 
                        qr/\.x?html?$/, qr/\.ikiwiki-new$/,
                        qr/(^|\/).svn\//, qr/.arch-ids\//, qr/{arch}\//,
                        qr/(^|\/)_MTN\//, qr/(^|\/)_darcs\//,
 -                      qr/\.dpkg-tmp$/],
 +                      qr/(^|\/)CVS\//, qr/\.dpkg-tmp$/],
                description => "regexps of source files to ignore",
                safe => 0,
                rebuild => 1,
        },
        web_commit_regexp => {
                type => "internal",
-               default => qr/^web commit (by (.*?(?=: |$))|from (\d+\.\d+\.\d+\.\d+)):?(.*)/,
+               default => qr/^web commit (by (.*?(?=: |$))|from ([0-9a-fA-F:.]+[0-9a-fA-F])):?(.*)/,
                description => "regexp to parse web commits from logs",
                safe => 0,
                rebuild => 0,
diff --combined IkiWiki/Wrapper.pm
index 0baf112ffd722c3ca133c92be2dd5982e01801ab,cf85738d68163763e8ac2bb1c7fc2ab04ef69187..57896e262fbef9cd08b74dc76ef0a26a9cb7ffdb
@@@ -38,15 -38,13 +38,16 @@@ sub gen_wrapper () 
  EOF
        }
  
-       my $test_receive="";
        if ($config{test_receive}) {
                require IkiWiki::Receive;
-               $test_receive=IkiWiki::Receive::gen_wrapper();
        }
+       
+       my @wrapper_hooks;
+       run_hooks(genwrapper => sub { push @wrapper_hooks, shift->() });
  
 +      my $check_args="        return 0;";
 +      run_hooks(wrapperargcheck => sub { $check_args = shift->(); });
 +
        my $check_commit_hook="";
        my $pre_exec="";
        if ($config{post_commit}) {
@@@ -119,18 -117,11 +120,18 @@@ addenv(char *var, char *val) 
        newenviron[i++]=s;
  }
  
 +int checkargs(int argc, char **argv) {
 +$check_args
 +}
 +
  int main (int argc, char **argv) {
        char *s;
  
 +      if (!checkargs(argc, argv))
 +              exit(0);
 +
  $check_commit_hook
- $test_receive
+ @wrapper_hooks
  $envsave
        newenviron[i++]="HOME=$ENV{HOME}";
        newenviron[i++]="WRAPPED_OPTIONS=$configstring";
@@@ -154,7 -145,6 +155,6 @@@ $pre_exe
        exit(1);
  }
  EOF
-       close OUT;
  
        my $cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc';
        if (system($cc, "$wrapper.c", "-o", "$wrapper.new") != 0) {