Mineo has uploaded a new change for review.
https://gerrit.wikimedia.org/r/76488
Change subject: RotatingFileHandler: Let the docstring make sense
......................................................................
RotatingFileHandler: Let the docstring make sense
Having files "app.2.log" and "app.2.log" didn't.
Change-Id: If96617cf7026ca33fded34e8a1f19db882f9b54f
---
M pywikibot/bot.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/88/76488/1
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 4424cb9..355dfec 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -55,8 +55,8 @@
"app.log", you would get "app.log", "app.1.log", "app.2.log", ...
through to "app.5.log". The file being written to is always "app.log" -
when it gets filled up, it is closed and renamed to "app.1.log", and if
- files "app.2.log", "app.2.log" etc. exist, then they are renamed to
- "app.2.log", "app.3.log" etc. respectively.
+ files "app.1.log", "app.2.log" etc. already exist, then they are
+ renamed to "app.2.log", "app.3.log" etc. respectively.
If backupCount is >= 1 do not rotate but create new numbered filenames.
The newest file has the highest number except some older numbered files
where deleted and the bot was restarted. In this case the ordering
--
To view, visit https://gerrit.wikimedia.org/r/76488
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If96617cf7026ca33fded34e8a1f19db882f9b54f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mineo <themineo(a)gmail.com>
Merlijn van Deen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/76486
Change subject: Updated pwb.py to better mirror direct script runs
......................................................................
Updated pwb.py to better mirror direct script runs
Before, execfile() ran the script in environment that pwb.py has, which
included os and path imports, and several other variables. Now, only
__file__, __name__ and __builtins__ are passed, which should be all that
is needed.
After this change, the effects of changeset 76484 can be seen using pwb.py
Change-Id: If9458fca50f07f08441dbb6e06f78bdbae2065de
---
M pwb.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/86/76486/1
diff --git a/pwb.py b/pwb.py
index 0327ab1..5f608bc 100644
--- a/pwb.py
+++ b/pwb.py
@@ -47,6 +47,6 @@
else:
raise Exception("%s not found!" % sys.argv[0])
sys.path.append(os.path.split(sys.argv[0])[0])
- execfile(sys.argv[0])
+ execfile(sys.argv[0], {'__name__': '__main__', '__builtins__': __builtins__, '__file__': sys.argv[0]})
else:
sys.argv.append('')
--
To view, visit https://gerrit.wikimedia.org/r/76486
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9458fca50f07f08441dbb6e06f78bdbae2065de
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
jenkins-bot has submitted this change and it was merged.
Change subject: Expand all Text for Checking Hidden Categories
......................................................................
Expand all Text for Checking Hidden Categories
An example of this issue is [1] which has a template that actually adds the
_HIDDEN_ keyword. The other change proposed here is not to use regular
expressions for that match, it is pointless.
We still search for the _HIDDEN_ keyword because newly created empty
categories do not show up in the category table, and thus are not
returned by the API (bug #48824)
[1] http://commons.wikimedia.org/wiki/Category:Cultural_heritage_monuments_in_P…
Change-Id: I4d1acce3c3c311724a577435829630c8e2548581
---
M pywikibot/page.py
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index d34a5c6..215b643 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1844,9 +1844,12 @@
def isHiddenCategory(self):
"""Return True if the category is hidden."""
- text = self.get()
- hidden = re.search('__HIDDENCAT__', text)
- return bool(hidden)
+ # FIXME
+ # This should use action=query&list=allcategories
+ # setting acfrom and acto to the category title and adding
+ # acprop=hidden but currently fails in some cases
+ # (see bug 48824)
+ return '__HIDDENCAT__' in self.expand_text()
def copyTo(self, cat, message):
"""
--
To view, visit https://gerrit.wikimedia.org/r/76343
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4d1acce3c3c311724a577435829630c8e2548581
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhallasw(a)gmail.com>
Gerrit-Reviewer: DMaggot <david.narvaez(a)computer.org>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)gmail.com>
Gerrit-Reviewer: Rubin <rubin(a)wikimedia.ru>
Gerrit-Reviewer: jenkins-bot
Hello PywikibotCommitWatcher,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/76319
to review the following change.
Change subject: improvement; add '.gitattributes' file in order to re-enable some $Id$ support (from compat)
......................................................................
improvement; add '.gitattributes' file in order to re-enable some $Id$ support (from compat)
Change-Id: I04162bcc9eb169704e8b52963950f8f2caad6692
---
A .gitattributes
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/19/76319/1
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..274c91d
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.py ident
--
To view, visit https://gerrit.wikimedia.org/r/76319
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I04162bcc9eb169704e8b52963950f8f2caad6692
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <dr.trigon(a)surfeu.ch>
Gerrit-Reviewer: PywikibotCommitWatcher <pywikibot-commits(a)lists.wikimedia.org>