From c4e4064778f0dc2f0c0f7e7d172c72bcaca253f8 Mon Sep 17 00:00:00 2001 From: Esa Kulmala Date: Wed, 15 Jun 2016 16:28:10 +0300 Subject: [PATCH] fixed output dir handling for osc checkout --- osc/commandline.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 1ae73ba0..31937567 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4279,20 +4279,16 @@ Please submit there instead, or use --nodevelproject to force direct submission. print_request_list(apiurl, project, package) elif project: - prj_dir = project + prj_dir = opts.output_dir if opts.output_dir else project if sys.platform[:3] == 'win': prj_dir = prj_dir.replace(':', ';') if os.path.exists(prj_dir): - sys.exit('osc: project \'%s\' already exists' % project) + sys.exit('osc: project directory \'%s\' already exists' % prj_dir) # check if the project does exist (show_project_meta will throw an exception) show_project_meta(apiurl, project) - if opts.output_dir is not None: - init_dir=opts.output_dir - else: - init_dir=prj_dir - Project.init_project(apiurl, init_dir, project, conf.config['do_package_tracking']) + Project.init_project(apiurl, prj_dir, project, conf.config['do_package_tracking']) print(statfrmt('A', prj_dir)) # all packages @@ -4321,7 +4317,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. prj_dir = prj_dir, service_files = opts.source_service_files, \ server_service_files = opts.server_side_source_service_files, \ progress_obj=self.download_progress, size_limit=opts.limit_size, \ - meta=opts.meta,outdir=outputdir) + meta=opts.meta) except oscerr.LinkExpandError as e: print('Link cannot be expanded:\n', e, file=sys.stderr) print('Use "osc repairlink" for fixing merge conflicts:\n', file=sys.stderr)