Revision: 3899
Author: wikipedian
Date: 2007-07-25 21:33:20 +0000 (Wed, 25 Jul 2007)
Log Message:
-----------
fixed serious bug [ 1757382 ] edit conflit undetected
Andre Engels did it properly in wikipedia.py CVS r1.927 (SVN r3710) with
the description "Avoid 'solving' edit conflicts by throwing away the
conflicting edit."
Bryan broke it in wikipedia.py CVS r1.950 (SVN r3837) with the
description "Undo the change in r1.927 to get a token of the page itself
instead of the sandbox, to prevent edit conflicts when editting as
sysop."
I basically reverted it to Andre's version. I didn't test if unwanted
edit conflicts are raised when someone edits the sandbox. But even if
that's the case, having an edit conflict here and there is better than
the catastrophic situation that we have at the moment (bots overwrite
other user's changes).
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2007-07-25 20:19:06 UTC (rev 3898)
+++ trunk/pywikipedia/wikipedia.py 2007-07-25 21:33:20 UTC (rev 3899)
@@ -1038,10 +1038,10 @@
If watchArticle is None, leaves the watchlist status unchanged.
"""
- # Fetch the page to get an edit token. If we already have
+ # Fetch a page to get an edit token. If we already have
# fetched a page, this will do nothing, because get() is cached.
try:
- self.get(force = True, get_redirect = True)
+ self.site().sandboxpage.get(force = True, get_redirect = True)
except NoPage:
pass
Show replies by date