[Pywikipedia-l] SVN: [6237] branches/rewrite/pywikibot/scripts/category.py

russblau at svn.wikimedia.org russblau at svn.wikimedia.org
Fri Jan 9 19:21:42 UTC 2009


Revision: 6237
Author:   russblau
Date:     2009-01-09 19:21:42 +0000 (Fri, 09 Jan 2009)

Log Message:
-----------
Merge r6236 from trunk

Modified Paths:
--------------
    branches/rewrite/pywikibot/scripts/category.py

Property Changed:
----------------
    branches/rewrite/pywikibot/scripts/category.py

Modified: branches/rewrite/pywikibot/scripts/category.py
===================================================================
--- branches/rewrite/pywikibot/scripts/category.py	2009-01-09 19:04:37 UTC (rev 6236)
+++ branches/rewrite/pywikibot/scripts/category.py	2009-01-09 19:21:42 UTC (rev 6237)
@@ -404,11 +404,9 @@
         self.deleteEmptySourceCat = deleteEmptySourceCat
         self.titleRegex = titleRegex
         # set edit summary message
-        if self.editSummary:
-            pywikibot.setAction(self.editSummary)
-        else:
-            pywikibot.setAction(pywikibot.translate(site, msg_change)
-                                % self.oldCat.title())
+        if not self.editSummary:
+            self.editSummary = pywikibot.translate(site, msg_change) \
+                               % self.oldCat.title()
 
     def run(self):
         site = pywikibot.getSite()
@@ -447,6 +445,7 @@
             if not self.titleRegex or re.search(self.titleRegex,
                                                 article.title()):
                 catlib.change_category(article, self.oldCat, newCat,
+                                       comment=self.editSummary,
                                        inPlace=self.inPlace)
 
         # Move subcategories
@@ -457,6 +456,7 @@
             if not self.titleRegex or re.search(self.titleRegex,
                                                 subcategory.title()):
                 catlib.change_category(subcategory, self.oldCat, newCat,
+                                       comment=self.editSummary,
                                        inPlace=self.inPlace)
 
         # Delete the old category and its moved talk page


Property changes on: branches/rewrite/pywikibot/scripts/category.py
___________________________________________________________________
Added: svn:mergeinfo
   + /trunk/pywikipedia/category.py:6236





More information about the Pywikipedia-l mailing list