getnikola/nikola — pull request #1526 by felixfontein (2014-12-07 17:24:37+00:00)
Title: Refactoring util.config_changed and its usage in core plugins

Hi!

As mentioned in the discussion of #1521, Nikola uses doit's ```config_changed``` (with little modifications), which has the problem that it can be used only once per ```uptodate``` field of a task. This led to some hackish constructions mentioned in that discussion which make very specific assumptions on the ```uptodate``` fields of some tasks (usually that there's precisely one ```config_changed``` object in there and nothing else) to work around this restriction of the original ```config_changed```.

This pull request:

- Adds an option to the constructor of ``nikola.utils.config_changed`` to allow to specify an identifier which will be included in the varialbe where the hash of the config is stored, so that

- Modifies all code in Nikola's core which sets ```uptodate``` of a task to use this new functionality, and in particular gets rid of all hacks mentioned above.

Cheers,
Felix

(One thing I don't really know: how should this be put into CHANGES.txt? Since this is a rather internal change which is only relevant to core and plugin developers (and most plugin developers do not have to care, either), how should it be announced there?)