Forwarding to wikitech-l, which is probably a more appropriate list for this question.
---------- Forwarded message ---------- From: sl contrib sl.contrib@googlemail.com Date: 2009/6/1 Subject: Re: [Mediawiki-api] Revisions since certain date / wiki mirror To: MediaWiki API announcements & discussion mediawiki-api@lists.wikimedia.org
Hi Roan, thanks again for the reply. Comments in line. On Sun, May 31, 2009 at 8:05 PM, Roan Kattouw roan.kattouw@gmail.com wrote:
2009/5/31 sl contrib sl.contrib@googlemail.com:
On the other hand it seem strange though that I can't get easily get all 'events' between two dates.
You can, with recentchanges. It has its limitations, but IMO you should be able to cope with them.
While looking at this I noticed that log entries for moved pages don't contain revids: 'logaction' => 'move', 'move' => { 'new_ns' => 0, 'new_title' => 'Sandpit/test2' }, 'logtype' => 'move', 'revid' => 0, 'timestamp' => '2009-05-31T21:47:11Z', 'old_revid' => 0, This seems to be inconsistent: For edits, there's an old_revid and a revid (which are recorded in the log), and when moving a page, it's there's also an old_revid and a revid. However, those are not recorded in the log. Any ideas as to why that is, and if it doesn't make sense, which bug tracker should it go on?
Would it somehow be possible to build an intermediate solution? E.g. would it be feasible to build a dedicated action=query&prop=allchanges&start=...&end=... that just solved that problem?
For revisions, possibly. It wouldn't include log events, though.
To be able to query: (a) all pages that changed between two dates (with the latest revision of that page) and (b) all revisions that were made between two dates would be useful, with similar options to prop=revisions and in particular rvprop (and going across all namespaces). Merging this with log information would not be essential, as most things would be visible from the revisions themselves. Only the deletion log would have to be taken into account, but this could be done in a second query. Would that be feasible? Something like that would make a mirroring process very easy, as you could just feed in the date of your last update, and get the pages back that you need. All the best, Bjoern _______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
On 01/06/2009, at 9:37 PM, Roan Kattouw wrote:
---------- Forwarded message ---------- From: sl contrib sl.contrib@googlemail.com Date: 2009/6/1 Subject: Re: [Mediawiki-api] Revisions since certain date / wiki mirror To: MediaWiki API announcements & discussion <mediawiki-api@lists.wikimedia.org
While looking at this I noticed that log entries for moved pages don't contain revids: 'logaction' => 'move', 'move' => { 'new_ns' => 0, 'new_title' => 'Sandpit/test2' }, 'logtype' => 'move', 'revid' => 0, 'timestamp' => '2009-05-31T21:47:11Z', 'old_revid' => 0, This seems to be inconsistent: For edits, there's an old_revid and a revid (which are recorded in the log), and when moving a page, it's there's also an old_revid and a revid. However, those are not recorded in the log. Any ideas as to why that is, and if it doesn't make sense, which bug tracker should it go on?
I know of at least some code which uses the existence (or not) of rc_revid to distinguish log entries from edits. Any change would break this.
The reason that it's different is because we didn't originally add dummy revisions to the database for moves and protections, and added it later as a usability feature. The two aren't technically related at all, as far as the software is concerned.
-- Andrew Garrett Contract Developer, Wikimedia Foundation agarrett@wikimedia.org http://werdn.us
Hi Andrew, hi all, Thanks for the message. I was looking at this issue because of "wiki mirroring". Out of interest, are there others on this list interested in wiki mirroring or synchronisation?
One way to make this work (at least for frequent updates), is to work with the recent changes. If the log entry for a 'move' had the relevant revision ids, then I would know exactly which revisions to fetch to make the update. Without those, I need to do more queries to determine them.
However, because of the dummy revisions for move, it's possible (and may be better) to just work with the revision list (rather than with recent changes), and I am working on this at the moment. I guess it would still be neat if the move log had the relevant information, but if it breaks things elsewhere, it may not be worth it.
If there are others interested in wiki mirroring or synchronisation, I'm keen to discuss! (There's obviously been some work in that area, and I'd be keen to see whether things can be taken forward in some way.)
All the best, Bjoern
On Tue, Jun 2, 2009 at 1:14 PM, Andrew Garrett agarrett@wikimedia.orgwrote:
On 01/06/2009, at 9:37 PM, Roan Kattouw wrote:
---------- Forwarded message ---------- From: sl contrib sl.contrib@googlemail.com Date: 2009/6/1 Subject: Re: [Mediawiki-api] Revisions since certain date / wiki mirror To: MediaWiki API announcements & discussion <
mediawiki-api@lists.wikimedia.org
While looking at this I noticed that log entries for moved pages don't contain revids: 'logaction' => 'move', 'move' => { 'new_ns' => 0, 'new_title' => 'Sandpit/test2' }, 'logtype' => 'move', 'revid' => 0, 'timestamp' => '2009-05-31T21:47:11Z', 'old_revid' => 0, This seems to be inconsistent: For edits, there's an old_revid and a revid (which are recorded in the log), and when moving a page, it's there's also an old_revid and a revid. However, those are not recorded in the log. Any ideas as to why that is, and if it doesn't make sense, which bug tracker should it go on?
I know of at least some code which uses the existence (or not) of rc_revid to distinguish log entries from edits. Any change would break this.
The reason that it's different is because we didn't originally add dummy revisions to the database for moves and protections, and added it later as a usability feature. The two aren't technically related at all, as far as the software is concerned.
-- Andrew Garrett Contract Developer, Wikimedia Foundation agarrett@wikimedia.org http://werdn.us
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org