Hello PywikibotCommitWatcher,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/76453
to review the following change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially ......................................................................
bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially
Change-Id: Ie468cdcbcd0bed470a158fa4f5edb879d25a889c --- M pywikibot/bot.py 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/53/76453/1
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 4424cb9..5f8f0af 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -624,7 +624,8 @@ if config.verbose_output: import re ver = pywikibot.__version__ # probably can be improved on - m = re.search(r"$Id$", ver) + m = re.search(r"%(S)sId: .* (\d+ \d+-\d+-\d+ \d+:\d+:\d+Z) .*%(S)s"%\ + {'S': r"$"}, ver) pywikibot.output(u'Pywikipediabot r%s' % m.group(1)) pywikibot.output(u'Python %s' % sys.version)
Merlijn van Deen has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially ......................................................................
Patch Set 1:
This regex doesn't work for git in any case, where the format is
__version__ = '$Id: 8d8f23e9d9a4265dfcb0995129e3a465c2fc3521 $'
DrTrigon has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially ......................................................................
Patch Set 1: Verified+1 Code-Review+1
DrTrigon has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially ......................................................................
Patch Set 1:
Good point - I will fix this!
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/76453
to look at the new patch set (#2).
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format
Change-Id: Ie468cdcbcd0bed470a158fa4f5edb879d25a889c --- M pywikibot/bot.py 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/53/76453/2
jenkins-bot has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 2: Verified+2
Build succeeded.
- https://integration.wikimedia.org/ci/job/pywikibot-core-pep8/34/console : FAILURE in 23s (non-voting) - https://integration.wikimedia.org/ci/job/pywikibot-core-pyflakes/34/console : SUCCESS in 4s (non-voting)
DrTrigon has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 2: Verified+1 Code-Review+1
DrTrigon has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 2:
Is this change ok now? Can I approve?
Xqt has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 2: Code-Review-1
could be simplified per:
m = re.search(r"$Id: (\w+) $", ver)
DrTrigon has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 2:
1 - '(.*)' CAN be improved to '(\w+)' 2 - '%(S)s' CANNOT be simplified to '$' because then git will replace it with the actual value (see [1] this is the main reason for this patch)
[1] https://gerrit.wikimedia.org/r/#/c/76450/2/pywikibot/bot.py
Xqt has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 2: -Code-Review
Does it replace everything between "$Id" and "$" and we need a line break in it? Right?
m = re.search(r"$Id: (\w+) " r"$", ver)
would be another way. Looks quite simplier and there is no neet calculating or formatting the string.
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/76453
to look at the new patch set (#3).
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format
Change-Id: Ie468cdcbcd0bed470a158fa4f5edb879d25a889c --- M pywikibot/bot.py 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/53/76453/3
jenkins-bot has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 3: Verified+2
Build succeeded.
This change was unable to be automatically merged with the current state of the repository. Please rebase your change and upload a new patchset.
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/76453
to look at the new patch set (#4).
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format
Change-Id: Ie468cdcbcd0bed470a158fa4f5edb879d25a889c --- M pywikibot/bot.py 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/53/76453/4
jenkins-bot has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 4: Verified+2
Build succeeded.
- https://integration.wikimedia.org/ci/job/pywikibot-core-pep8/46/console : FAILURE in 24s (non-voting) - https://integration.wikimedia.org/ci/job/pywikibot-core-pyflakes/46/console : SUCCESS in 5s (non-voting)
DrTrigon has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 4: Verified+1 Code-Review+1
Yes - this seams to work also! Good job - thanks! :)
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/76453
to look at the new patch set (#5).
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format
Change-Id: Ie468cdcbcd0bed470a158fa4f5edb879d25a889c --- M pywikibot/bot.py 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/53/76453/5
jenkins-bot has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 5: Verified+2
Build succeeded.
- https://integration.wikimedia.org/ci/job/pywikibot-core-pep8/47/console : FAILURE in 23s (non-voting) - https://integration.wikimedia.org/ci/job/pywikibot-core-pyflakes/47/console : SUCCESS in 4s (non-voting)
DrTrigon has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 5: Verified+1 Code-Review+1
Correct merged with HEAD now.
Xqt has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 5: Code-Review+2
It would be a good idea to comment this strange behavior of git in the source. Maybe nobody would remember this is few years.
Xqt has submitted this change and it was merged.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format
Change-Id: Ie468cdcbcd0bed470a158fa4f5edb879d25a889c --- M pywikibot/bot.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: DrTrigon: Checked; Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 28c71db..3e7aa5b 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -640,7 +640,8 @@ if config.verbose_output: import re ver = pywikibot.__version__ # probably can be improved on - m = re.search(r"$Id$", ver) + m = re.search(r"$Id: (\w+) " + r"$", ver) pywikibot.output(u'Pywikipediabot r%s' % m.group(1)) pywikibot.output(u'Python %s' % sys.version)
jenkins-bot has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 5:
Starting gate-and-submit jobs. https://integration.wikimedia.org/zuul/
jenkins-bot has posted comments on this change.
Change subject: bug fix; follow-up to change-set 76450, a $Id$ was removed accidentially bug fix; regex adopted to new $Id$ format ......................................................................
Patch Set 5:
Build succeeded.
- https://integration.wikimedia.org/ci/job/pywikibot-core-pep8/48/console : FAILURE in 27s (non-voting) - https://integration.wikimedia.org/ci/job/pywikibot-core-pyflakes/48/console : SUCCESS in 7s (non-voting)
pywikibot-commits@lists.wikimedia.org