diff options
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r-- | IkiWiki/Setup/Automator.pm | 9 | ||||
-rw-r--r-- | IkiWiki/Setup/Yaml.pm | 11 |
2 files changed, 15 insertions, 5 deletions
diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm index e9a572450..2dcb424e5 100644 --- a/IkiWiki/Setup/Automator.pm +++ b/IkiWiki/Setup/Automator.pm @@ -72,9 +72,15 @@ sub import (@) { } elsif ($config{rcs} eq 'bzr') { # TODO + print STDERR "warning: do not know how to set up the bzr_wrapper hook!\n"; } elsif ($config{rcs} eq 'mercurial') { # TODO + print STDERR "warning: do not know how to set up the mercurial_wrapper hook!\n"; + } + elsif ($config{rcs} eq 'tla') { + # TODO + print STDERR "warning: do not know how to set up the tla_wrapper hook!\n"; } elsif ($config{rcs} eq 'cvs') { $config{cvs_wrapper}=$config{repository}."/CVSROOT/post-commit"; @@ -124,9 +130,10 @@ sub import (@) { IkiWiki::run_hooks(checkconfig => sub { shift->() }); }; if ($@) { + my $err=$@; print STDERR sprintf(gettext("** Disabling plugin %s, since it is failing with this message:"), $plugin)."\n"; - print STDERR "$@\n"; + print STDERR "$err\n"; push @{$bakconfig{disable_plugins}}, $plugin; } } diff --git a/IkiWiki/Setup/Yaml.pm b/IkiWiki/Setup/Yaml.pm index 0fc273675..904784728 100644 --- a/IkiWiki/Setup/Yaml.pm +++ b/IkiWiki/Setup/Yaml.pm @@ -10,17 +10,16 @@ sub loaddump ($$) { my $class=shift; my $content=shift; - eval q{use YAML}; + eval q{use YAML::Any}; + eval q{use YAML} if $@; die $@ if $@; + $YAML::Syck::ImplicitUnicode=1; IkiWiki::Setup::merge(Load($content)); } sub gendump ($@) { my $class=shift; - eval q{use YAML}; - die $@ if $@; - "# IkiWiki::Setup::Yaml - YAML formatted setup file", "#", (map { "# $_" } @_), @@ -35,7 +34,11 @@ sub dumpline ($$$$) { my $type=shift; my $prefix=shift; + eval q{use YAML::Old}; + eval q{use YAML} if $@; + die $@ if $@; $YAML::UseHeader=0; + my $dump=Dump({$key => $value}); chomp $dump; if (length $prefix) { |