Get rid of --regexp command line option
authorEd Bartosh <eduard.bartosh@intel.com>
Sun, 30 Mar 2014 08:57:00 +0000 (11:57 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Wed, 2 Apr 2014 12:43:45 +0000 (15:43 +0300)
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 <eduard.bartosh@intel.com>
repa.1
repa/list.py

diff --git a/repa.1 b/repa.1
index f95b7cff3d0740d6969e249ccbdd13c89fb7a562..e01a530dcc67df822db8148dcf576f7bd6abd130 100644 (file)
--- a/repa.1
+++ b/repa.1
@@ -82,7 +82,7 @@ Target OBS project.
 .\"
 .\" The "list" command description
 .\"
-.SS \fBlist\fR [\-\-help] [\-\-regexp <regexp>] [\-\-processes <processes>]
+.SS \fBlist\fR [\-\-help] [\-\-processes <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
index 09796623d0496273c9b3fb7c5dbbc2c97fe4b6e3..f3db2b9b846d06e9f86570fdff9984fabbf54824 100755 (executable)
@@ -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__':