mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 18:46:17 +01:00
Merge branch 'clean_xpath' of https://github.com/lethliel/osc
Let's get rid of this old cruft.
This commit is contained in:
commit
f1c31561cb
16
osc/core.py
16
osc/core.py
@ -4309,12 +4309,10 @@ def get_review_list(apiurl, project='', package='', byuser='', bygroup='', bypro
|
||||
if package:
|
||||
todo['package'] = package
|
||||
for kind, val in todo.items():
|
||||
xpath_base = 'action/target/@%(kind)s=\'%(val)s\' or ' \
|
||||
'submit/target/@%(kind)s=\'%(val)s\''
|
||||
xpath_base = 'action/target/@%(kind)s=\'%(val)s\''
|
||||
|
||||
if conf.config['include_request_from_project']:
|
||||
xpath_base = xpath_join(xpath_base, 'action/source/@%(kind)s=\'%(val)s\' or ' \
|
||||
'submit/source/@%(kind)s=\'%(val)s\'', op='or', inner=True)
|
||||
xpath_base = xpath_join(xpath_base, 'action/source/@%(kind)s=\'%(val)s\'', op='or', inner=True)
|
||||
xpath = xpath_join(xpath, xpath_base % {'kind': kind, 'val': val}, op='and', nexpr_parentheses=True)
|
||||
|
||||
if conf.config['verbose'] > 1:
|
||||
@ -4398,19 +4396,15 @@ def get_request_list(apiurl, project='', package='', req_who='', req_state=('new
|
||||
if package:
|
||||
todo['package'] = package
|
||||
for kind, val in todo.items():
|
||||
xpath_base = 'action/target/@%(kind)s=\'%(val)s\' or ' \
|
||||
'submit/target/@%(kind)s=\'%(val)s\''
|
||||
|
||||
xpath_base = 'action/target/@%(kind)s=\'%(val)s\''
|
||||
if conf.config['include_request_from_project']:
|
||||
xpath_base = xpath_join(xpath_base, 'action/source/@%(kind)s=\'%(val)s\' or ' \
|
||||
'submit/source/@%(kind)s=\'%(val)s\'', op='or', inner=True)
|
||||
xpath_base = xpath_join(xpath_base, 'action/source/@%(kind)s=\'%(val)s\'', op='or', inner=True)
|
||||
xpath = xpath_join(xpath, xpath_base % {'kind': kind, 'val': val}, op='and', nexpr_parentheses=True)
|
||||
|
||||
if req_type:
|
||||
xpath = xpath_join(xpath, 'action/@type=\'%s\'' % req_type, op='and')
|
||||
for i in exclude_target_projects:
|
||||
xpath = xpath_join(xpath, '(not(action/target/@project=\'%(prj)s\' or ' \
|
||||
'submit/target/@project=\'%(prj)s\'))' % {'prj': i}, op='and')
|
||||
xpath = xpath_join(xpath, '(not(action/target/@project=\'%(prj)s\'))' % {'prj': i}, op='and')
|
||||
|
||||
if conf.config['verbose'] > 1:
|
||||
print('[ %s ]' % xpath)
|
||||
|
@ -17,8 +17,8 @@ def rdiff_url(pkg, oldprj, newprj):
|
||||
(newprj, pkg, pkg, oldprj.replace(':', '%3A'))
|
||||
|
||||
def request_url(prj):
|
||||
return API_URL + 'search/request?match=%%28state%%2F%%40name%%3D%%27new%%27+or+state%%2F%%40name%%3D%%27review%%27%%29+and+%%28action%%2Ftarget%%2F%%40project%%3D%%27%s%%27+or+submit%%2Ftarget%%2F%%40project%%3D%%27%s%%27+or+action%%2Fsource%%2F%%40project%%3D%%27%s%%27+or+submit%%2Fsource%%2F%%40project%%3D%%27%s%%27%%29' % \
|
||||
tuple([prj.replace(':', '%3A')] * 4)
|
||||
return API_URL + 'search/request?match=%%28state%%2F%%40name%%3D%%27new%%27+or+state%%2F%%40name%%3D%%27review%%27%%29+and+%%28action%%2Ftarget%%2F%%40project%%3D%%27%s%%27+or+action%%2Fsource%%2F%%40project%%3D%%27%s%%27%%29' % \
|
||||
tuple([prj.replace(':', '%3A')] * 2)
|
||||
|
||||
def GET_PROJECT_PACKAGES(*projects):
|
||||
def decorator(test_method):
|
||||
|
Loading…
Reference in New Issue
Block a user