[Pywikipedia-bugs] [Maniphest] [Commented On] T175399: text-contains exception does not respect regex option from fix but listens to command line

2017-09-09 Thread Mpaa
Mpaa added a comment.
If I got you correctly, I agree.
Each fix (either via user-fixes or cmd line) has its own set of specs (we can see cmd line inputs as 'one fix').
An option from cmd line to override fix definition in specific areas.TASK DETAILhttps://phabricator.wikimedia.org/T175399EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: MpaaCc: Mpaa, Aklapper, matej_suchanek, pywikibot-bugs-list, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T175399: text-contains exception does not respect regex option from fix but listens to command line

2017-09-09 Thread matej_suchanek
matej_suchanek added a comment.

In T175399#3592968, @Mpaa wrote:
Replacement management in replace.py gives me a headache.


Me too after your clarification. But I believe we can handle that.

There is just a few scenarios: (pwb.py replace only run with...)


-manualinput with one or more pairs
a single -fix
multiple -fix'es
one or more -fix'es and -manualinput with one or more pairs


My opinion:


-regex (-dotall, -nocase etc.) shouldn't influence individual fixes
when only -fix'es are requested, all of them should inherit all exceptions (-excepttext etc.)
when all replacements come from command line, apply exceptions to all of them ("squash" replacements to a single -fix)


Now there's only one remaining point: combined input. I would introduce a new -inherit argument that would optionally make all command line exceptions inherited to all fixes (as well as the "squashed" one), otherwise (default behavior) it would only be relevant for command line replacements.

Comments?TASK DETAILhttps://phabricator.wikimedia.org/T175399EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: matej_suchanekCc: Mpaa, Aklapper, matej_suchanek, pywikibot-bugs-list, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T175399: text-contains exception does not respect regex option from fix but listens to command line

2017-09-08 Thread Mpaa
Mpaa added a comment.
Because Exceptions specified via 'fix' are merged to those via CLI.
So all exceptions become common,
And when this is done, the 'regex': True information is not considered, but only the -regex value.

I am not sure what is the wanted behaviour.
And if there is a reason in not handling the exceptions fix by fix.

Replacement management in replace.py gives me a headache.TASK DETAILhttps://phabricator.wikimedia.org/T175399EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: MpaaCc: Mpaa, Aklapper, matej_suchanek, pywikibot-bugs-list, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs