Skip to content

Commit

Permalink
- fix cleanup handling of maintenance request
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Feb 15, 2012
1 parent 39b85af commit 3820c19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions osc/commandline.py
Expand Up @@ -2659,8 +2659,6 @@ def do_maintenancerequest(self, subcmd, opts, *args):
maintenance_attribute = opts.attribute

source_project = source_packages = target_project = opt_sourceupdate = None
if not opts.no_cleanup:
opt_sourceupdate = 'cleanup'

if len(args) == 0 and is_project_dir(os.curdir):
source_project = store_read_project(os.curdir)
Expand All @@ -2670,6 +2668,10 @@ def do_maintenancerequest(self, subcmd, opts, *args):
source_project = args[0]
if len(args) > 1:
source_packages = args[1:]
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:
opt_sourceupdate = 'cleanup'

if opts.incident_project:
target_project = opts.incident_project
Expand Down

0 comments on commit 3820c19

Please sign in to comment.