diff --git a/NEWS b/NEWS index 13516492..065b4d98 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ - drop the support for deprecated cbinstall and cbpreinstall directives - allow to set maintainer or bugowner ship for a binary package initially, but ask back if this is the right place. + - support listing of deleted source files "ls -D $PROJECT $PACKAGE" 0.139 - various bugfixes for owner search diff --git a/osc/commandline.py b/osc/commandline.py index f34b6f76..02f66a2b 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -305,8 +305,6 @@ class Osc(cmdln.Cmdln): package = store_read_package(cwd) if len(args) > 1: package = args[1] - if opts.deleted: - raise oscerr.WrongArgs("Too many arguments when listing deleted packages") if len(args) > 2: if opts.deleted: raise oscerr.WrongArgs("Too many arguments when listing deleted packages") @@ -405,6 +403,7 @@ class Osc(cmdln.Cmdln): verbose=opts.verbose, expand=opts.expand, meta=opts.meta, + deleted=opts.deleted, revision=rev) link_seen = '_link' in l if opts.verbose: diff --git a/osc/core.py b/osc/core.py index 02f7d7d1..a2970e37 100644 --- a/osc/core.py +++ b/osc/core.py @@ -2995,11 +2995,13 @@ def meta_get_packagelist(apiurl, prj, deleted=None): return [ node.get('name') for node in root.findall('entry') ] -def meta_get_filelist(apiurl, prj, package, verbose=False, expand=False, revision=None, meta=False): +def meta_get_filelist(apiurl, prj, package, verbose=False, expand=False, revision=None, meta=False, deleted=False): """return a list of file names, or a list File() instances if verbose=True""" query = {} + if deleted: + query['deleted'] = 1 if expand: query['expand'] = 1 if meta: