From ee843c7523c9b0f615ee467e26e7ff4b35514c78 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 21 May 2007 03:00:45 +0000 Subject: [PATCH] improve messages --- IkiWiki.pm | 1 - IkiWiki/Plugin/aggregate.pm | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index 31e175d2a..1cfa419b6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -689,7 +689,6 @@ sub lockwiki (;$) { #{{{ error("wiki is locked; waited $wait seconds without lock being freed (possible stuck process or stale lock?)"); } else { - debug("wiki is locked"); return 0; } } diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 5024975ac..eb5067d9f 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -33,8 +33,10 @@ sub getopt () { #{{{ sub checkconfig () { #{{{ if ($config{aggregate} && ! ($config{post_commit} && IkiWiki::commit_hook_enabled())) { - # don't wait for the lock - IkiWiki::lockwiki(0) || exit 1; + if (! IkiWiki::lockwiki(0)) { + debug("wiki is locked by another process, not aggregating"); + exit 1; + } loadstate(); IkiWiki::loadindex(); -- 2.45.2