diff options
author | Joey Hess <joey@kitenet.net> | 2010-04-20 13:43:21 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-04-20 13:43:21 -0400 |
commit | ca33969823342c3c61219a2cb167e40f765f934b (patch) | |
tree | fd209d2246a159e3d8848ed97cc4eb7be30bf613 /IkiWiki | |
parent | a97964688b73d0a3237c798dce3fb064ff29ff11 (diff) | |
parent | d1a1f3ad21e9e58d1232fc3d997028a463ccad4a (diff) | |
download | ikiwiki-ca33969823342c3c61219a2cb167e40f765f934b.tar ikiwiki-ca33969823342c3c61219a2cb167e40f765f934b.tar.gz |
Merge branch 'master' into file_pruned_revamp
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/search.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Render.pm | 39 |
2 files changed, 21 insertions, 20 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index c0e8703d8..a1e7026ca 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -70,7 +70,7 @@ sub index (@) { # A unique pageterm is used to identify the document for a page. my $pageterm=pageterm($params{page}); - return $params{content} unless defined $pageterm; + return unless defined $pageterm; my $db=xapiandb(); my $doc=Search::Xapian::Document->new(); diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index a6b0f0617..bbf8f915e 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -366,13 +366,13 @@ sub find_new_files ($) { push @internal_new, $file; } 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") { + if (! $times_noted) { + debug(sprintf(gettext("querying %s for file creation and modification times.."), $config{rcs})); + $times_noted=1; + } + eval { my $ctime=rcs_getctime("$config{srcdir}/$file"); if ($ctime > 0) { @@ -431,7 +431,7 @@ sub remove_del (@) { foreach my $file (@_) { my $page=pagename($file); if (! isinternal($page)) { - debug(sprintf(gettext("removing old page %s"), $page)); + debug(sprintf(gettext("removing obsolete %s"), $page)); } foreach my $old (@{$oldrenderedfiles{$page}}) { @@ -634,34 +634,35 @@ sub render_dependent ($$$$$$$) { if ($type == $IkiWiki::DEPEND_LINKS) { next unless $linkchangers->{lc($page)}; } - return $page; + $reason=$page; + return 1; } } return undef; }; if ($depends{$p}{$dep} & $IkiWiki::DEPEND_CONTENT) { - last if $reason = - $in->(\@changed, $IkiWiki::DEPEND_CONTENT); - last if $internal_dep && ($reason = + last if $in->(\@changed, $IkiWiki::DEPEND_CONTENT); + last if $internal_dep && ( $in->($internal_new, $IkiWiki::DEPEND_CONTENT) || $in->($internal_del, $IkiWiki::DEPEND_CONTENT) || - $in->($internal_changed, $IkiWiki::DEPEND_CONTENT)); + $in->($internal_changed, $IkiWiki::DEPEND_CONTENT) + ); } if ($depends{$p}{$dep} & $IkiWiki::DEPEND_PRESENCE) { - last if $reason = - $in->(\@exists_changed, $IkiWiki::DEPEND_PRESENCE); - last if $internal_dep && ($reason = + last if $in->(\@exists_changed, $IkiWiki::DEPEND_PRESENCE); + last if $internal_dep && ( $in->($internal_new, $IkiWiki::DEPEND_PRESENCE) || - $in->($internal_del, $IkiWiki::DEPEND_PRESENCE)); + $in->($internal_del, $IkiWiki::DEPEND_PRESENCE) + ); } if ($depends{$p}{$dep} & $IkiWiki::DEPEND_LINKS) { - last if $reason = - $in->(\@changed, $IkiWiki::DEPEND_LINKS); - last if $internal_dep && ($reason = + last if $in->(\@changed, $IkiWiki::DEPEND_LINKS); + last if $internal_dep && ( $in->($internal_new, $IkiWiki::DEPEND_LINKS) || $in->($internal_del, $IkiWiki::DEPEND_LINKS) || - $in->($internal_changed, $IkiWiki::DEPEND_LINKS)); + $in->($internal_changed, $IkiWiki::DEPEND_LINKS) + ); } } } |