mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-02 09:46:16 +01:00
sort request lists by id
This commit is contained in:
parent
09cee2a9f0
commit
69458ca8c4
@ -5044,7 +5044,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
what = {'project': ''}
|
||||
elif type in args_sr:
|
||||
requests = get_request_list(apiurl, req_who=user, exclude_target_projects=exclude_projects)
|
||||
for r in requests:
|
||||
for r in requests_sort(requests):
|
||||
print r.list_view(), '\n'
|
||||
return
|
||||
elif not type in args_pkg:
|
||||
@ -5075,7 +5075,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
r = Request()
|
||||
r.read(node)
|
||||
requests.append(r)
|
||||
for r in requests:
|
||||
for r in requests_sort(requests):
|
||||
print r.list_view(), '\n'
|
||||
return
|
||||
except urllib2.HTTPError, e:
|
||||
@ -5108,7 +5108,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
if list_requests:
|
||||
# old style, only for OBS 2.1 and before. Should not be used, since it is slow and incomplete
|
||||
requests = get_user_projpkgs_request_list(apiurl, user, projpkgs=request_todo)
|
||||
for r in requests:
|
||||
for r in requests_sort(requests):
|
||||
print r.list_view(), '\n'
|
||||
else:
|
||||
for i in sorted(roles.keys()):
|
||||
|
@ -6122,4 +6122,7 @@ def filter_role(meta, user, role):
|
||||
for node in delete:
|
||||
root.remove(node)
|
||||
|
||||
def requests_sort(requests):
|
||||
return sorted(requests, cmp=lambda a,b: cmp(int(a.reqid), int(b.reqid)))
|
||||
|
||||
# vim: sw=4 et
|
||||
|
Loading…
Reference in New Issue
Block a user