aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-04-16 18:29:45 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-04-16 18:30:56 -0400
commitdee2940c0bc97080088c99f399cd0ff0df3bec23 (patch)
tree0710cd8f4a3d64d1dc22e52911f04954f8d22fa2 /IkiWiki/Render.pm
parent0bd6c327666e2ac747183faca483c46ee2774285 (diff)
downloadikiwiki-dee2940c0bc97080088c99f399cd0ff0df3bec23.tar
ikiwiki-dee2940c0bc97080088c99f399cd0ff0df3bec23.tar.gz
automatically run --gettime, and optimise it for git
* Automatically run --gettime the first time ikiwiki is run on a given srcdir. * Optimise --gettime for git, so it's appropriatly screamingly fast. (This could be done for other backends too.) * However, --gettime for git no longer follows renames. * Use above to fix up timestamps on docwiki, as well as ensure that timestamps on basewiki files shipped in the deb are sane.
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r--IkiWiki/Render.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index e1cb68462..a6b0f0617 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -352,6 +352,8 @@ sub find_new_files ($) {
my @new;
my @internal_new;
+ my $times_noted;
+
foreach my $file (@$files) {
my $page=pagename($file);
if (exists $pagesources{$page} && $pagesources{$page} ne $file) {
@@ -363,7 +365,12 @@ sub find_new_files ($) {
if (isinternal($page)) {
push @internal_new, $file;
}
- else {
+ elsif ($config{rcs}) {
+ if (! $times_noted) {
+ debug(sprintf(gettext("querying %s for file creation and modification times.."), $config{rcs}));
+ $times_noted=1;
+ }
+
push @new, $file;
if ($config{gettime} && -e "$config{srcdir}/$file") {
eval {
@@ -377,7 +384,7 @@ sub find_new_files ($) {
}
my $mtime;
eval {
- my $mtime=rcs_getmtime("$config{srcdir}/$file");
+ $mtime=rcs_getmtime("$config{srcdir}/$file");
};
if ($@) {
print STDERR $@;