Ladsgroup has uploaded a new change for review.
https://gerrit.wikimedia.org/r/94495
Change subject: Removing nonsense comments and not letting edit when no change
can be made
......................................................................
Removing nonsense comments and not letting edit when no change can be made
It puts pressure on server and causes bugs like this
Bug: 55275
Change-Id: I8e5368ede646493859b7aeb74355885f3a3f6500
---
M category_redirect.py
1 file changed, 1 insertion(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat
refs/changes/95/94495/1
diff --git a/category_redirect.py b/category_redirect.py
index ad0ea67..fe6e604 100644
--- a/category_redirect.py
+++ b/category_redirect.py
@@ -109,14 +109,12 @@
newtext = pywikibot.replaceCategoryInPlace(oldtext, oldCat, newCat,
site=self.site)
try:
- # even if no changes, still save the page, in case it needs
- # an update due to changes in a transcluded template
- article.put(newtext, comment)
if newtext == oldtext:
pywikibot.output(u'No changes made in page %s.'
% article.title(asLink=True))
return False
return True
+ article.put(newtext, comment)
except pywikibot.EditConflict:
pywikibot.output(u'Skipping %s because of edit conflict'
% article.title(asLink=True))
--
To view, visit https://gerrit.wikimedia.org/r/94495
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e5368ede646493859b7aeb74355885f3a3f6500
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits