Revision: 6221
Author: russblau
Date: 2009-01-05 13:49:21 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
handle null edits better
Modified Paths:
--------------
trunk/pywikipedia/category_redirect.py
Modified: trunk/pywikipedia/category_redirect.py
===================================================================
--- trunk/pywikipedia/category_redirect.py 2009-01-05 13:48:05 UTC (rev 6220)
+++ trunk/pywikipedia/category_redirect.py 2009-01-05 13:49:21 UTC (rev 6221)
@@ -156,13 +156,14 @@
"""
oldtext = article.get(get_redirect=True, force=True)
newtext = wikipedia.replaceCategoryInPlace(oldtext, oldCat, newCat)
- if newtext == oldtext:
- wikipedia.output(
- u'No changes in made in page %s.' % article.aslink())
+ try:
# even if no changes, still save the page, in case it needs
# an update due to changes in a transcluded template
- try:
article.put(newtext, comment)
+ if newtext == oldtext:
+ wikipedia.output(
+ u'No changes in made in page %s.' % article.aslink())
+ return False
return True
except wikipedia.EditConflict:
wikipedia.output(
Revision: 6220
Author: russblau
Date: 2009-01-05 13:48:05 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
save page even if unchanged
Modified Paths:
--------------
trunk/pywikipedia/category_redirect.py
Modified: trunk/pywikipedia/category_redirect.py
===================================================================
--- trunk/pywikipedia/category_redirect.py 2009-01-03 14:34:49 UTC (rev 6219)
+++ trunk/pywikipedia/category_redirect.py 2009-01-05 13:48:05 UTC (rev 6220)
@@ -150,9 +150,8 @@
Moves subcategories of oldCat as well. oldCat and newCat should be
Category objects. If newCat is None, the category will be removed.
- This is a copy of portions of catlib.change_category() with the
- added capability to post a talk page message on pages that cannot be
- fixed due to protection.
+ This is a copy of portions of catlib.change_category(), with some
+ changes.
"""
oldtext = article.get(get_redirect=True, force=True)
@@ -160,7 +159,8 @@
if newtext == oldtext:
wikipedia.output(
u'No changes in made in page %s.' % article.aslink())
- return False
+ # even if no changes, still save the page, in case it needs
+ # an update due to changes in a transcluded template
try:
article.put(newtext, comment)
return True
Bugs item #2485201, was opened at 2009-01-04 10:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2485201&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Murph (pauljmurph)
Assigned to: Nobody/Anonymous (nobody)
Summary: Wikia: wikia-credits footer silently added to edits
Initial Comment:
Pywikipedia [http] trunk/pywikipedia (r6219, Jan 03 2009, 14:34:49)
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)]
Wikia have modified MediaWiki to add a <div id="wikia-credits">...</div> footer to pages. Although this is a Wikia-specific change, pywikipediabot should really ignore it. It would be easy for a new user to inadvertantly add this footer to the page source on a large scale without realising it. Ideally, Wikia would strip the footer again on upload, but they don't do that at present.
Patch attached.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2485201&group_…
Bugs item #2485193, was opened at 2009-01-04 09:58
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2485193&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Murph (pauljmurph)
Assigned to: Nobody/Anonymous (nobody)
Summary: replace.py: Patch: Ignore variations in newlines on new/old
Initial Comment:
Pywikipedia [http] trunk/pywikipedia (r6219, Jan 03 2009, 14:34:49)
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)]
The standard replace.py has a habit of showing a file as having changed, but with zero changes if a \r\n has been changed to \n by one of the patterns. Solution: treat \r\n as \n in the comparison to determine if any changes have been made.
Patch attached.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2485193&group_…
Bugs item #2485186, was opened at 2009-01-04 09:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2485186&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Murph (pauljmurph)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch to support includeredirects="only" for Site().allpages
Initial Comment:
Pywikipedia [http] trunk/pywikipedia (r6219, Jan 03 2009, 14:34:49)
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)]
Patch to support includeredirects="only" for wikipedia.py:Site:allpages. Tested working against MediaWiki 1.13.3 on wowwiki.com.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2485186&group_…
Bugs item #2484627, was opened at 2009-01-03 22:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2484627&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: removing sr interwiki
Initial Comment:
There is problem with sr.wikipedia - latin characters in URL or in interwiki are automatically translated to cyrilic, but bot does not recognize it ant wants to remove this valid interwiki
see
http://cs.wikipedia.org/w/index.php?title=Nikdo_v%C3%A1s_nesm%C3%AD_b%C3%AD…
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2484627&group_…