mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-09 12:35:48 +01:00
osc search now returns sorted by project, and sorted by package,
not just sorted projects and random package order.
This commit is contained in:
parent
1a5023ff28
commit
1b38b8c338
@ -9,6 +9,7 @@ import cmdln
|
|||||||
import conf
|
import conf
|
||||||
import oscerr
|
import oscerr
|
||||||
from optparse import SUPPRESS_HELP
|
from optparse import SUPPRESS_HELP
|
||||||
|
import pprint
|
||||||
|
|
||||||
MAN_HEADER = r""".TH %(ucname)s "1" "%(date)s" "%(name)s %(version)s" "User Commands"
|
MAN_HEADER = r""".TH %(ucname)s "1" "%(date)s" "%(name)s %(version)s" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -4866,7 +4867,14 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
print 'No matches found for \'%s\' in %ss' % (role_filter or search_term, kind)
|
print 'No matches found for \'%s\' in %ss' % (role_filter or search_term, kind)
|
||||||
continue
|
continue
|
||||||
# construct a sorted, flat list
|
# construct a sorted, flat list
|
||||||
results.sort(lambda x, y: cmp(x[0], y[0]))
|
# Sort by first column, follwed by second column if we have two columns, else sort by first.
|
||||||
|
results.sort(lambda x, y:
|
||||||
|
(x[1] and y[1])
|
||||||
|
and
|
||||||
|
(cmp(x[0], y[0]) or cmp(x[1], y[1]))
|
||||||
|
or
|
||||||
|
cmp(x[0], y[0]))
|
||||||
|
|
||||||
new = []
|
new = []
|
||||||
for i in results:
|
for i in results:
|
||||||
new.extend(i)
|
new.extend(i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user