preserve ctimes across rebuilds

master
joey 2006-03-23 21:54:30 +00:00
parent 72e8ace28d
commit 4f93b8e2b4
2 changed files with 10 additions and 8 deletions

View File

@ -288,11 +288,11 @@ sub refresh () { #{{{
foreach my $file (@files) {
my $page=pagename($file);
if (! $oldpagemtime{$page}) {
debug("new page $page");
debug("new page $page") unless exists $pagectime{$page};
push @add, $file;
$links{$page}=[];
$pagesources{$page}=$file;
$pagectime{$page}=time;
$pagectime{$page}=time unless exists $pagectime{$page};
}
}
my @del;

14
ikiwiki
View File

@ -325,12 +325,14 @@ sub loadindex () { #{{{
}
my $page=pagename($items{src}[0]);
$pagesources{$page}=$items{src}[0];
$oldpagemtime{$page}=$items{mtime}[0];
if (! $config{rebuild}) {
$pagesources{$page}=$items{src}[0];
$oldpagemtime{$page}=$items{mtime}[0];
$oldlinks{$page}=[@{$items{link}}];
$links{$page}=[@{$items{link}}];
$renderedfiles{$page}=$items{dest}[0];
}
$pagectime{$page}=$items{ctime}[0];
$oldlinks{$page}=[@{$items{link}}];
$links{$page}=[@{$items{link}}];
$renderedfiles{$page}=$items{dest}[0];
}
close IN;
} #}}}
@ -473,7 +475,7 @@ sub main () { #{{{
}
else {
lockwiki();
loadindex() unless $config{rebuild};
loadindex();
require IkiWiki::Render;
rcs_update();
refresh();