Page MenuHomePhabricator

replacementfile for replace.py
Closed, ResolvedPublic

Description

in compat:
replace.py -pagesgenerator -replacementfile:replace.txt

this does not work for core, the whole code part is missing here:

elif arg.startswith('-replacementfile'):
    if len(arg) == len('-replacementfile'):
        replacefile = pywikibot.input(
            u'Please enter the filename to read replacements from:')
    else:
        replacefile = arg[len('-replacementfile')+1:]
    try:
        commandline_replacements.extend(
            [x.lstrip(u'\uFEFF').rstrip('\r\n')
             for x in codecs.open(replacefile, 'r', 'utf-8')])
    except IOError:
        raise pywikibot.Error(
       '\n%s cannot be opened. Try again :-)' % replacefile)

Version: core-(2.0)
Severity: enhancement

Details

Reference
bz68503

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:29 AM
bzimport added a project: Pywikibot-Scripts.
bzimport set Reference to bz68503.
bzimport added a subscriber: Unknown Object (????).
JAnD created this task.Jul 24 2014, 11:42 AM
jayvdb set Security to None.
jayvdb removed a subscriber: Unknown Object (????).

Change 181619 had a related patch set uploaded (by Prianka):
T70503 replacementfile for replace.py

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

Patch-For-Review

Change 181621 had a related patch set uploaded (by Prianka):
T70503 replacementfile for replace.py

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

Patch-For-Review

Change 181621 abandoned by John Vandenberg:
T70503 replacementfile for replace.py

Reason:
Please put all your 'replacementfile' changes into a single commit and upload them to https://gerrit.wikimedia.org/r/#/c/181242/ by using "Change-Id: I3c68edf090c605b78b5864bc19b68e8448604a4e" in the commit message. If you are updating an existing gerrit review, check your commit message has the Change-Id as the one you are trying to replace.

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

Change 181619 abandoned by John Vandenberg:
T70503 replacementfile for replace.py

Reason:
Please put all your 'replacementfile' changes into a single commit and upload them to https://gerrit.wikimedia.org/r/#/c/181242/ by using "Change-Id: I3c68edf090c605b78b5864bc19b68e8448604a4e" in the commit message. If you are updating an existing gerrit review, check your commit message has the Change-Id as the one you are trying to replace.

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

Change 181242 had a related patch set uploaded (by Prianka):
T70503 replacementfile for replace.py

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

Patch-For-Review

Change 181242 had a related patch set uploaded (by Prianka):
Created replacementfile for replace.py

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

Patch-For-Review

Change 181242 had a related patch set uploaded (by John Vandenberg):
Port replace.py -replacementfile from compat

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

Patch-For-Review

Change 181242 merged by jenkins-bot:
Port replace.py -replacementfile from compat

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

jayvdb closed this task as Resolved.Jun 9 2015, 5:41 AM
jayvdb edited projects, added Pywikibot-replace.py; removed Pywikibot-Scripts.