preserve ctimes across rebuilds
parent
72e8ace28d
commit
4f93b8e2b4
|
@ -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
14
ikiwiki
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue