From 15b27b7ff199d4558dc78e40b24e24e13ade0f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 10 Oct 2012 15:54:21 +0200 Subject: [PATCH] - add osc mr --cleanup option --- osc/commandline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 7c23d38d..8accf6f9 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2686,6 +2686,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='specify message TEXT') @cmdln.option('--no-cleanup', action='store_true', help='do not remove source project on accept') + @cmdln.option('--cleanup', action='store_true', + help='do remove source project on accept') @cmdln.option('--incident', metavar='INCIDENT', help='specify incident number to merge in') @cmdln.option('--incident-project', metavar='INCIDENT_PROJECT', @@ -2726,9 +2728,11 @@ Please submit there instead, or use --nodevelproject to force direct submission. source_packages = args[1:] release_project = args[-1] source_packages.remove(release_project) + if opts.cleanup: + opt_sourceupdate = 'cleanup' if not opts.no_cleanup: default_branch = 'home:%s:branches:' % (conf.get_apiurl_usr(apiurl)) - if source_project.startswith(default_branch) and not opts.no_cleanup: + if source_project.startswith(default_branch): opt_sourceupdate = 'cleanup' if opts.incident_project: