Page MenuHomePhabricator

transferbot does not support namespaces in right way
Closed, ResolvedPublic

Description

c:\Pywikipedia\ssh\pywikibot\core>pwb.py transferbot -simulate -page:user:xqt/Test -tolang:en -overwrite -tofamily:wiktionary

    Page transfer configuration
    ---------------------------
    Source: Site("de", "wikipedia")
    Target: Site("en", "wiktionary")

    Pages to transfer: -page:user:xqt/Test

    Prefix for transferred pages:

Moving [[Benutzer:Xqt/Test]] to [[wiktionary:en:Benutzer:Xqt/Test]]...
<noinclude>

The appended summary text is:

This page was moved from [[wikipedia:de:Benutzer:Xqt/Test]]. It's edit history can be viewed at [[Benutzer:Xqt/Test/edithistory]]

There are wrong namespaces aliases on target site. This could be solved easily, but I don't know how to proceed with prefix because that might be a namespace. What is the right way:

prefix + namespace + title

or

prefix + title

or

namespace + prefix + title

where title is without namespace in this sample.


Version: core-(2.0)
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:17 AM
bzimport set Reference to bz59649.
Xqt removed jayvdb as the assignee of this task.Apr 6 2018, 4:43 PM

Change 437162 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [bugfix] Fix namespaces handling in transferbot.py

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

Dvorapa added a project: good first task.
Dvorapa moved this task from Backlog to Doing on the good first task board.

This could be solved easily, but I don't know how to proceed with prefix because that might be a namespace.

There was already a namespace after prefix before, so we should not brek current behavior even if it seems weird to us. When someone makes a new task, we will change the behavior. Or we can make another parameter -tonamespace and split the current -prefix functionality.

Change 437162 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Fix namespaces handling in transferbot.py

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