Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
osc.24636
1051-warn-when-trying-to-commit-a-prj-pac-manag...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1051-warn-when-trying-to-commit-a-prj-pac-managed-in-scm.patch of Package osc.24636
From 295ea7f3562ff93af586cebe1e04646f3ca6605c Mon Sep 17 00:00:00 2001 From: Daniel Mach <daniel.mach@suse.com> Date: Tue, 7 Jun 2022 16:45:45 +0200 Subject: [PATCH] Warn when trying to commit a prj/pac managed in scm --- osc/commandline.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 64e5a8f1..e876e2f2 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5015,10 +5015,16 @@ def _commit(self, subcmd, opts, args): 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 @@ def _commit(self, subcmd, opts, args): 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 = []
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor