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.
(This interacted especially badly with the bug fixed by
90b4d079605b72bb50d1da41402d994960e10937.)
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.
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.
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.
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.
Do not allow an unterminated """ string to be treated as a series of bare
words. Fixes runaway regexp recursion/backtracking in strange situations.
(See 1d57a21c98 for test case.)
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.