mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-03 18:16:17 +01:00
Warn when trying to commit a prj/pac managed in scm
This commit is contained in:
parent
715a30f3f3
commit
295ea7f356
@ -5015,10 +5015,16 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
skip_local_service_run = False
|
||||
if not conf.config['local_service_run'] or opts.skip_local_service_run:
|
||||
skip_local_service_run = True
|
||||
arg_list = args[:]
|
||||
for arg in arg_list:
|
||||
|
||||
for arg in args.copy():
|
||||
if conf.config['do_package_tracking'] and is_project_dir(arg):
|
||||
prj = Project(arg)
|
||||
|
||||
if prj.scm_url:
|
||||
print("WARNING: Skipping project '{}' because it is managed in scm (git): {}".format(prj.name, prj.scm_url))
|
||||
args.remove(arg)
|
||||
continue
|
||||
|
||||
if not msg and not opts.no_message:
|
||||
msg = edit_message()
|
||||
|
||||
@ -5037,6 +5043,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
pacs, no_pacs = findpacs(args, fatal=False)
|
||||
|
||||
for pac in pacs.copy():
|
||||
if pac.scm_url:
|
||||
print("WARNING: Skipping package '{}' because it is managed in scm (git): {}".format(pac.name, pac.scm_url))
|
||||
pacs.remove(pac)
|
||||
continue
|
||||
|
||||
if conf.config['do_package_tracking'] and (pacs or no_pacs):
|
||||
prj_paths = {}
|
||||
single_paths = []
|
||||
|
Loading…
Reference in New Issue
Block a user