|
|
@ -37,6 +37,7 @@ class Completer(object):
|
|
|
|
# generate a completion list from excuses.
|
|
|
|
# generate a completion list from excuses.
|
|
|
|
# - it might contain too many items, but meh
|
|
|
|
# - it might contain too many items, but meh
|
|
|
|
complete = []
|
|
|
|
complete = []
|
|
|
|
|
|
|
|
tpu = []
|
|
|
|
for e in britney.excuses:
|
|
|
|
for e in britney.excuses:
|
|
|
|
ver = None
|
|
|
|
ver = None
|
|
|
|
pkg = e.name
|
|
|
|
pkg = e.name
|
|
|
@ -50,7 +51,10 @@ class Completer(object):
|
|
|
|
pkg = pkg.split("/")[0]
|
|
|
|
pkg = pkg.split("/")[0]
|
|
|
|
name = "%s/%s" % (e.name, britney.sources[suite][pkg][0]) # 0 == VERSION
|
|
|
|
name = "%s/%s" % (e.name, britney.sources[suite][pkg][0]) # 0 == VERSION
|
|
|
|
complete.append(name)
|
|
|
|
complete.append(name)
|
|
|
|
|
|
|
|
if suite == 'tpu':
|
|
|
|
|
|
|
|
tpu.append(name)
|
|
|
|
self.packages = sorted(complete)
|
|
|
|
self.packages = sorted(complete)
|
|
|
|
|
|
|
|
self.tpu_packages = sorted(tpu)
|
|
|
|
testing = britney.sources['testing']
|
|
|
|
testing = britney.sources['testing']
|
|
|
|
self.testing_packages = sorted("%s/%s" % (pkg, testing[pkg][0]) for pkg in testing)
|
|
|
|
self.testing_packages = sorted("%s/%s" % (pkg, testing[pkg][0]) for pkg in testing)
|
|
|
|
|
|
|
|
|
|
|
@ -69,6 +73,8 @@ class Completer(object):
|
|
|
|
# complete pkg/[arch/]version
|
|
|
|
# complete pkg/[arch/]version
|
|
|
|
if words[0] == 'remove':
|
|
|
|
if words[0] == 'remove':
|
|
|
|
packages = self.testing_packages
|
|
|
|
packages = self.testing_packages
|
|
|
|
|
|
|
|
elif words[0] == 'approve':
|
|
|
|
|
|
|
|
packages = self.tpu_packages
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
packages = self.packages
|
|
|
|
packages = self.packages
|
|
|
|
start = bisect.bisect_left(packages, text)
|
|
|
|
start = bisect.bisect_left(packages, text)
|
|
|
|