From: Joey Hess Date: Wed, 21 Apr 2010 20:13:37 +0000 (-0400) Subject: commit autocreated tag pages X-Git-Tag: 3.20100427~62^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fd6fb4c5071d9317b4388a0db6b97037cc010477;p=ikiwiki.git commit autocreated tag pages --- diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index d2a3d4dfd..c98dd80b2 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -79,11 +79,18 @@ sub gentag ($) { my $tagfile = newpagefile($tagpage, $config{default_pageext}); add_autofile($tagfile, "tag", sub { - debug(sprintf(gettext("creating tag page %s"), $tag)); + my $message=sprintf(gettext("creating tag page %s"), $tag); + debug($message); my $template=template("autotag.tmpl"); $template->param(tag => $tag); writefile($tagfile, $config{srcdir}, $template->output); + if ($config{rcs}) { + IkiWiki::disable_commit_hook(); + IkiWiki::rcs_add($tagfile); + IkiWiki::rcs_commit_staged($message, undef, undef); + IkiWiki::enable_commit_hook(); + } }); } }