Branch: refs/heads/master
Home: https://github.com/openSUSE/osc
Commit: b647521f81db140be77d2cc9f016443b8c9292e0
https://github.com/openSUSE/osc/commit/b647521f81db140be77d2cc9f016443b8c929...
Author: Marcus Huewe
Date: 2020-11-25 (Wed, 25 Nov 2020)
Changed paths:
M osc/core.py
Log Message:
-----------
Support a regex based name filtering in core.get_prj_results
So far, core.get_prj_results only supports a substring based name
filtering mechanism. Now, a regex based name filtering mechanism
is used. That is, if the regex matches a package name, the package
is not filtered out.
This is an API incompatible change:
- 3rd party code which looks like this is going to break:
class Foo(str):
...
def __eq__(self, other):
return ...
... = core.get_prj_results(..., name_filter=Foo())
(My gut feeling says there are no such callers. However, if this
really breaks any serious code, we can fix it in a follow-up commit)
- "osc prjresults openSUSE:Leap:15.2:Update --name-filter zypper." will
now also show "zypper-docker" etc. because the dot (".") matches any
character (except a newline). Previously, only packages that contained
the str "zypper" followed by a dot (".") were shown. The old behavior
can be restored, if the dot is escaped: "osc prjresults
openSUSE:Leap:15.2:Update --name-filter 'zypper\.'".
Of course, this affects all other special characters, too.
Additionally, if an illegal regex is passed to the --name-filter option,
an exception is raised. The previous code did not fail.
This can break existing workflows and scripts. We could avoid this by
introducing a --name-filter-regex option but this would clutter the
UI (IMHO).
A regex based name filtering feature was requested by darix.
Commit: a9138e54d5035c525afe93296bcadc34605bd272
https://github.com/openSUSE/osc/commit/a9138e54d5035c525afe93296bcadc34605bd...
Author: Marco Strigl
Date: 2022-03-31 (Thu, 31 Mar 2022)
Changed paths:
M osc/core.py
Log Message:
-----------
Merge pull request #872 from marcus-h/prjresults_name_filter_regex
RFC: Support a regex based name filtering in core.get_prj_results
Compare: https://github.com/openSUSE/osc/compare/64631f1d91e0...a9138e54d503