From: Ed Bartosh Date: Sun, 30 Mar 2014 08:57:00 +0000 (+0300) Subject: Get rid of --regexp command line option X-Git-Tag: 0.2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85f8e734585e524bed089530ce1be69662c7d323;p=tools%2Frepa.git Get rid of --regexp command line option Dropped --regexp in favor of --project, which is much more clear and used in all modes. Fixes: #1772 Change-Id: I5347190f41f6c704fe2091909435aaeaa5452f62 Signed-off-by: Ed Bartosh --- diff --git a/repa.1 b/repa.1 index f95b7cf..e01a530 100644 --- a/repa.1 +++ b/repa.1 @@ -82,7 +82,7 @@ Target OBS project. .\" .\" The "list" command description .\" -.SS \fBlist\fR [\-\-help] [\-\-regexp ] [\-\-processes ] +.SS \fBlist\fR [\-\-help] [\-\-processes ] .RS 2 List submissions in the following format: @@ -117,14 +117,6 @@ submit/tizen/20140328.080409 ready sdbd Print short help text about the "list" command and exit. .RE -.PP -.B \-\-regexp -REGEXP -.RS 2 -Use REGEXP to filter out submission project. Regexp is applied to OBS project name. -Note, that regexp can also be specified in \fIrepa\fR configuration file. -.RE - .PP .B \-\-processes PROCESSES diff --git a/repa/list.py b/repa/list.py index 0979662..f3db2b9 100755 --- a/repa/list.py +++ b/repa/list.py @@ -65,12 +65,12 @@ def get_status(meta, build_results=None): return 'ready' -def list_submissions(obs, regexp, processes): +def list_submissions(obs, target, processes): """List submissions and groups.""" # submissions groups = [] for project, desc, build_results in \ - obs.get_projects('^%s.*%s' % (OBS_PROJECT_PREFIX, regexp), + obs.get_projects('^%s%s:submit' % (OBS_PROJECT_PREFIX, target), processes): meta = json.loads(desc) if ':submitgroup:' in project: @@ -100,8 +100,6 @@ class List(object): Add arguments to the parser. Called from [sub_]main. Set defaults for arguments from config. """ - parser.add_argument('-r', '--regexp', help='search regexp', - default=config.get('list_regexp', '.*')) parser.add_argument('--processes', type=int, help='amount of parallel processes to use', default=config.get('processes')) @@ -110,7 +108,7 @@ class List(object): def run(argv): """Command line entry point. Called from [sub_]main""" obs = OBS(argv.apiurl, argv.apiuser, argv.apipasswd) - return list_submissions(obs, argv.regexp, argv.processes) + return list_submissions(obs, argv.project, argv.processes) if __name__ == '__main__':