Joey Hess [Fri, 12 Jun 2009 23:31:18 +0000 (19:31 -0400)]
aggregate: Avoid resetting ctime when an item md5 changes.
Besides being wrong to do, this could lead to the wrong item
being expired, as follows: If B is added and at the same time
A is changed, then A's ctime may be set to the current time,
while B's is set to its creation time. Thus the new item, A,
is incorrectly removed as older.
Joey Hess [Fri, 12 Jun 2009 23:24:47 +0000 (19:24 -0400)]
aggregate: Fix storing of changed md5.
The aggregate state merge code neglected to merge changes to the md5
field of an item. Therefore, if an item's md5 changed after initial
aggregation, it would be updated, and rewritten, each time thereafter.
This was wasteful and indirectly led to some expire problems.
Joey Hess [Mon, 8 Jun 2009 22:27:40 +0000 (18:27 -0400)]
Optimise use of gettext, and avoid ugly warnings if Locale::gettext is not available.
The test suite was emitting a lot of ugly gettext warnings;
setting LC_ALL didn't solve the problem for all locale setups
(since ikiwiki remaps it to LANG, and ikiwiki didn't know about
the C locale).
People also seem generally annoyed by the messages when
Locale::Gettext is not installed, and I suspect will be
generally happier if it just silently doesn't localize.
The optimisation came about when I noticed that the gettext
sub was doing rather a lot of work each call just to see
if localisation is needed. We can avoid that work by caching,
and the best thing to cache is a version of the gettext sub
that does exactly the right thing.
This was slightly complicated by the locale setting,
which might need to override the original locale (or lack
thereof) after gettext has been called. So it needs to invalidate
the cache in that case. It used to do it via a global variable,
which I am happy to have also gotten rid of.
Joey Hess [Sat, 6 Jun 2009 06:36:40 +0000 (02:36 -0400)]
goto: Support being passed a page title that is not a valid page name, to support several cases including mercurial's long user names on the RecentChanges page, and urls with spaces being handled by the 404 plugin.
Joey Hess [Fri, 5 Jun 2009 20:58:06 +0000 (16:58 -0400)]
Setup automator: Check that each plugin added to the generated setup file can be loaded and that its config is ok. If a plugin fails for any reason, disable it in the generated file. Closes: 532001
Joey Hess [Fri, 5 Jun 2009 20:24:46 +0000 (16:24 -0400)]
move anchor page out of ikiwiki subdir
Since this page is not in the basewiki, it is confusing to put it in
the ikiwiki subdir, which is intended for basewiki and other underlay pages
that are used to document ikiwiki on other wikis.
Joey Hess [Fri, 5 Jun 2009 20:18:19 +0000 (16:18 -0400)]
remove link to page outside the base wiki
I'm sorry, but you can't simply go around adding links to pages that are
part of the basewiki, that point to pages outside the basewiki. Doing
so causes the test suite to fail, since the basewiki is then not
self-contained and has broken links.
FYI, the ikiwiki/anchor page you added is not part of the basewiki because
there's not a symlink to it in underlays/basewiki/ikiwiki in ikiwiki's
source. And I can't condone cluttering up the basewiki with such a page,
at least unless it gets significantly more useful somehow.
Joey Hess [Fri, 5 Jun 2009 20:10:08 +0000 (16:10 -0400)]
add test case for unterminated """ string
A directive that contains an unterminated """ string should not
cause each word of the string to be treated as a bare word. Instead,
the directive should fail to parse.
There are two tests. One just checks that a complete directive
containing such a string fails to parse. The other checks for a case
where a directive ends with a very long unterminated """ string,
and the directive is itself not closed. While this test won't fail,
it does trigger a nasty perl warning.