Page MenuHomePhabricator

transferbot.py adds same summary with /edithistory for /edithistory subpage
Open, LowPublic

Description


When I work with transferbot script, and when this script create /edithistory subpage, it creates this page with same summary. It should not be done with same summary. For /edithistory subpage from summary link to subpage should be removed.

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptFeb 18 2019, 11:19 PM
Zoranzoki21 updated the task description. (Show Details)Feb 18 2019, 11:21 PM
Xqt triaged this task as Low priority.Feb 19 2019, 3:31 AM
Jacek.duszenko added a comment.EditedFeb 22 2019, 2:31 PM

Hello, I've already fixed the bug in code but I want to make sure it really works. I wanted to set up my local development mediawiki and use transferbot.py in order to transfer a random page to it. How do I issue the transferbot.py command in that case? As this example from the docs:
$ python pwb.py transferbot -family:wikipedia -lang:en -cat:"Query service" -tofamily:wiktionary -tolang:ar -prefix:"Wiktionary:Import enwp/"
is clear to me, I don't know what arguments to use when I'd want to transfer the page to my local development wiki.

Apart from that, is there any better, quicker alternative to test if my bugfix works as intended? i suppose that testing it on test.wikipedia.org is not the proper way?

Thanks for answers in advance :)
@Dvorapa

Dvorapa added a comment.EditedFeb 22 2019, 2:40 PM

testwiki would be the most proper way I think. You can move for example from test.wikipedia.org to test2.wikipedia.org. Or you can use Beta Cluster wikis: https://deployment.wikimedia.beta.wmflabs.org/wiki/Special:SiteMatrix (https://www.mediawiki.org/wiki/Beta_Cluster) If you want to use your own mediawiki instance, then you just have to create its family file using generate_family_file.py (perhaps modify it a little bit afterwards to make it work better).

Jacek.duszenko added a subscriber: Xqt.EditedFeb 23 2019, 6:37 PM

Hello again, I've uploaded the change, then I improved the code according to @Xqt review. Can you please look at my second patch commit message? It isn't written anywhere how should it look. The problem is that this second patch message has messages of both my commits (one of them was squashed into another). Should this message look as is now? Or maybe it is to contain only one message. If yes, then which commit message?
Also I'm wondering if the first Jenkins build fail was because of flake8 warnings or something else screwed up?
Also @Xqt I think I added the second patch before you finished your remarks concerning first patch, could you please look at it once again? Can I write you a pm with questions relevant to the code? Or at least please point me to the place where I could write comments that would concern the code. Thanks

@Jacek.duszenko Hello, it seems you've uploaded two patches. To continue improving the original patch, you need to preserve the same change-id in the commit message. Please comment/answer into the original Gerrit patch (here: https://gerrit.wikimedia.org/r/#/c/pywikibot/core/+/492485/) for other reviewers to see, what's going on. Only one commit is accepted at the time so you should provide one commit message for all the changes you do. See the commit message guidelines here: https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines as well.

Thank you @Dvorapa , I have mistakenly deleted the unwanted change-Id, just like you said :) I have uploaded the third patch to a correct change. Now, how do I remove the one that was mistakenly added?

Change 492485 had a related patch set uploaded (by Jacek Duszenko; owner: Jacek Duszenko):
[pywikibot/core@master] [bugfix] Remove link to /edithistory from page's edithistory summary.

https://gerrit.wikimedia.org/r/492485

@Dvorapa @Xqt What does 'recheck' mean in gerrit code-reviews ? Does it mean that I should recheck my code again or maybe it triggers a jenkins test build?
Do you guys sit on some particular Zulip channel? I joined irc but it's like nobody's there.

It triggers Jenkins to run more tests..

Zoranzoki21 added a comment.EditedFeb 23 2019, 8:15 PM

But it works only for whitelisted users in CI/Jenkins configuration...

Dvorapa added a comment.EditedFeb 23 2019, 9:16 PM

We do have Zulip, but no one is using it. Everybody is on IRC usually (but not all the time obviously) and for urgent and attention-needed things we are using mailing lists. See https://www.mediawiki.org/wiki/Manual:Pywikibot/Communication. And today IRC is even full of skilled people :)

Jacek.duszenko added a comment.EditedFeb 23 2019, 11:08 PM

@Zoranzoki21 Let me make sure that I understood CR correctly. When moving the /edithistory between wikis you want the entire summary to disappear, right? I thought it would be better if information stayed, but in other form than it was before.

Zoranzoki21 added a comment.EditedFeb 23 2019, 11:12 PM

@Zoranzoki21 Let me make sure that I understood CR correctly. When moving the /edithistory between wikis you want the entire summary to disappear, right? I thought it would be better if information stayed, but in other form than it was before.

When I move page A from one wiki to second wiki it creates page A with summary Moved page from $1 (history)

It is ok.

This script creates /edithistory subpage with same summary of change. For creating /edithistory subpage same summary as for moving original page shouldn't be used.

I am not sure what you mean. Could you clarify with an example please? Let's say that we have page test.wikipedia.com/test_page. The script moves it to test2.wikipedia.com/test_page. The summary of this change now is as it was before. And it is correct.
Afterwards, the script moves page test.wikipedia.com/test_page/edithistory to test2.wikipedia.com/test_page/edithistory. And, according to you, what summary should be here in this case?

I am not sure what you mean. Could you clarify with an example please? Let's say that we have page test.wikipedia.com/test_page. The script moves it to test2.wikipedia.com/test_page. The summary of this change now is as it was before. And it is correct.
Afterwards, the script moves page test.wikipedia.com/test_page/edithistory to test2.wikipedia.com/test_page/edithistory. And, according to you, what summary should be here in this case?

No, it doesn't move /edithistory from source wiki, it script creates. /edithistory subpages are not avaiable..

Dvorapa added a comment.EditedFeb 23 2019, 11:29 PM

@Jacek.duszenko Let's make it clear. Using transferbot.py:

  • page test.wikipedia.org/test_page is moved to page test2.wikipedia.org/test_page
  • page test2.wikipedia.org/test_page/edithistory is created from test.wikipedia.org/test_page edit history logs/database entries

of course the summary should differ and it should be more descriptive for the /edithistory subpage too

@Jacek.duszenko Perhaps you will need to remake the whole patch, but if the patch will fix this issue, it's worth it :)

All right, I got it now. Getting to work then ;)