# Optimisation to avoid re-writing pages. Assumes commits never
# change (or that any changes are not important).
- return if exists $pagesources{$page} && ! $config{rebuild};
+ return $page if exists $pagesources{$page} && ! $config{rebuild};
# Limit pages to first 10, and add links to the changed pages.
my $is_excess = exists $change->{pages}[10];
my $file=$page."._change";
writefile($file, $config{srcdir}, $template->output);
utime $change->{when}, $change->{when}, "$config{srcdir}/$file";
+
+ return $page;
} #}}}
sub updatechanges ($$) { #{{{
my $pagespec=shift;
my $subdir=shift;
my @changes=@{shift()};
+
+ my %seen;
+ # add new changes
foreach my $change (@changes) {
- store($change, $subdir);
+ $seen{store($change, $subdir)}=1;
}
- # TODO: delete old
+ # delete old and excess changes
+ foreach my $page (keys %pagesources) {
+ if ($page=~/^\Q$subdir\E\/change_/ && ! $seen{$page}) {
+ unlink($config{srcdir}.'/'.$pagesources{$page});
+ }
+ }
} #}}}
1
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-29 04:45-0500\n"
+"POT-Creation-Date: 2008-01-29 15:21-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: ../IkiWiki/CGI.pm:382 ../IkiWiki/Plugin/brokenlinks.pm:24
#: ../IkiWiki/Plugin/inline.pm:241 ../IkiWiki/Plugin/opendiscussion.pm:17
-#: ../IkiWiki/Plugin/orphans.pm:28 ../IkiWiki/Render.pm:98
-#: ../IkiWiki/Render.pm:178
+#: ../IkiWiki/Plugin/orphans.pm:28 ../IkiWiki/Render.pm:100
+#: ../IkiWiki/Render.pm:180
msgid "discussion"
msgstr ""
msgid "nonexistant template %s"
msgstr ""
-#: ../IkiWiki/Plugin/inline.pm:249 ../IkiWiki/Render.pm:102
+#: ../IkiWiki/Plugin/inline.pm:249 ../IkiWiki/Render.pm:104
msgid "Discussion"
msgstr ""
msgid "getctime not implemented"
msgstr ""
-#: ../IkiWiki/Render.pm:276 ../IkiWiki/Render.pm:297
+#: ../IkiWiki/Render.pm:280 ../IkiWiki/Render.pm:301
#, perl-format
msgid "skipping bad filename %s"
msgstr ""
-#: ../IkiWiki/Render.pm:339
+#: ../IkiWiki/Render.pm:350
#, perl-format
msgid "removing old page %s"
msgstr ""
-#: ../IkiWiki/Render.pm:372
+#: ../IkiWiki/Render.pm:389
#, perl-format
msgid "scanning %s"
msgstr ""
-#: ../IkiWiki/Render.pm:377
+#: ../IkiWiki/Render.pm:394
#, perl-format
msgid "rendering %s"
msgstr ""
-#: ../IkiWiki/Render.pm:389
+#: ../IkiWiki/Render.pm:415
#, perl-format
msgid "rendering %s, which links to %s"
msgstr ""
-#: ../IkiWiki/Render.pm:406
+#: ../IkiWiki/Render.pm:436
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr ""
-#: ../IkiWiki/Render.pm:444
+#: ../IkiWiki/Render.pm:475
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr ""
-#: ../IkiWiki/Render.pm:456
+#: ../IkiWiki/Render.pm:487
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr ""
-#: ../IkiWiki/Render.pm:482
+#: ../IkiWiki/Render.pm:513
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr ""
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:767
+#: ../IkiWiki.pm:773
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""