On Tue, May 25, 2010 at 05:14:18PM -0300, Matias wrote:
When is the query actually been executed? Since I'm kind of lost in the
code. I want to see how loadrevisions executes the query and manages the
results. I've tried to "magically" make it work with this UAH patch (
http://pastebin.com/rhg9n7NM) for the site.py but doesn't seem to work as
easy as I wished. Any hint would be great !
The 'problem' of loadrevisions() is that it doesn't return anything, it just
loads revisions (sic) and store them in the _revisions attribute of the Page()
object, which is a dictionnary of Revision() objects (see update_page() in
api.py). And these Revision() objects are not meant to store diffs.
My suggestion would be to directly use a PropertyGenerator and handle the
result yourself instead of parsing it via update_page. Which will be almost
the same thing you've shown on your pastebin link, with the last part
(api.update_page(...)) removed and replaced by something useful for you.
stan.