summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Bartosh <eduard.bartosh@intel.com>2014-12-22 14:59:41 +0200
committerEd Bartosh <eduard.bartosh@intel.com>2014-12-22 15:12:38 +0200
commitbcdca19c376759819f97bbbc38d879f036d17985 (patch)
tree87ba443af603ecaa223cfca999ce9336de4da7d1
parent95d4671df6a99176bc50ec49a76a3940b4e5baf1 (diff)
downloadrepa-bcdca19c376759819f97bbbc38d879f036d17985.tar.gz
repa-bcdca19c376759819f97bbbc38d879f036d17985.tar.bz2
repa-bcdca19c376759819f97bbbc38d879f036d17985.zip
Output SR for rejected/accepted submissions
Ouput of repa list now contains SRs for rejected or accepted submissions in base project. Change-Id: Iac1de4c57c896c28934f50507bdf89e98e9e0181 Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
-rw-r--r--debian/changelog3
-rw-r--r--packaging/repa.changes3
-rwxr-xr-xrepa/list.py19
3 files changed, 16 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog
index cdfee25..403323f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,8 +13,9 @@ repa (0.3) unstable; urgency=low
* Reworked repa diff (Fixes: #1869)
* Implement --base option for repa list
* Pylinted codebase
+ * Output SR for rejected/accepted submissions
- -- Ed Bartosh <eduard.bartosh@intel.com> Sun, 14 Dec 2014 00:10:02 +0200
+ -- Ed Bartosh <eduard.bartosh@intel.com> Mon, 22 Dec 2014 15:01:02 +0200
repa (0.2) unstable; urgency=low
diff --git a/packaging/repa.changes b/packaging/repa.changes
index 1237a5c..ee2d08e 100644
--- a/packaging/repa.changes
+++ b/packaging/repa.changes
@@ -1,4 +1,4 @@
-* Sun Dec 14 2014 Ed Bartosh <ed@ed.fi.intel.com> 0.3
+* Sun Dec 22 2014 Ed Bartosh <ed@ed.fi.intel.com> 0.3
- group: disable publishing when aggregating packages
- Skip conflicting submissions when creating a group
- group: Implemented parallel package aggregating (Fixes: #1955)
@@ -12,6 +12,7 @@
- Reworked repa diff (Fixes: #1869)
- Implement --base option for repa list
- Pylinted codebase
+- Output SR for rejected/accepted submissions
* Wed May 21 2014 Ed Bartosh <eduard.bartosh@intel.com> 0.2
- Implement --processes options for repa list (Fixes: #1762)
diff --git a/repa/list.py b/repa/list.py
index 98d0223..4a43e18 100755
--- a/repa/list.py
+++ b/repa/list.py
@@ -84,14 +84,13 @@ def show_urls(meta):
print ' obs url: ', obs_url
print
-def tag_accepted(obs, project, package, tag):
- """Check if tag is in comments of accepted SRs."""
- for sreq in obs.get_srs(project, 'accepted', str(package)):
+def get_sr(obs, project, package, tag, status):
+ """Check if tag is in comments of accepted/declined SRs."""
+ for sreq in obs.get_srs(project, status, str(package)):
descr = sreq[-1]
if descr and 'Tag:' in descr:
if tag == descr.split('Tag: ')[-1].split()[0]:
- return True
- return False
+ return sreq[0]
def list_submissions(obs, target, processes, base, is_colorize=False,
showurls=False, ignore=''):
@@ -117,8 +116,14 @@ def list_submissions(obs, target, processes, base, is_colorize=False,
base_status = get_status(base_meta, colorizer,
base_build_results, ignore)
else:
- if tag_accepted(obs, base, projects[0], tag):
- base_status = colorizer.green('accepted')
+ asr = get_sr(obs, base, projects[0], tag, 'accepted')
+ if asr:
+ base_status = colorizer.green('accepted. SR %s' % asr)
+ else:
+ rsr = get_sr(obs, base, projects[0], tag, 'revoked')
+ if rsr:
+ base_status = colorizer.red('rejected. SR %s' % rsr)
+
print '%-37s %-37s %-37s %s' % (meta['git_tag'], \
get_status(meta, colorizer, build_results, ignore),
base_status, ','.join(projects))