mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 09:56:13 +01:00
- be a bit more verbose and tell the user about the package tracking feature
This commit is contained in:
parent
b03614dff2
commit
e5ff09152d
@ -1239,7 +1239,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
args = parseargs(args)
|
||||
arg_list = args[:]
|
||||
for arg in arg_list:
|
||||
if is_project_dir(arg):
|
||||
if is_project_dir(arg) and conf.config['do_package_tracking']:
|
||||
prj = Project(arg, False)
|
||||
for pac in prj.pacs_unvers:
|
||||
pac_dir = getTransActPath(os.path.join(prj.dir, pac))
|
||||
@ -1257,6 +1257,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
args.append(pac_dir)
|
||||
args.remove(arg)
|
||||
prj.write_packages()
|
||||
elif is_project_dir(arg):
|
||||
print >>sys.stderr, 'osc: addremove is not supported in a project dir unless ' \
|
||||
'\'do_package_tracking\' is enabled in the configuration file'
|
||||
sys.exit(1)
|
||||
|
||||
pacs = findpacs(args)
|
||||
for p in pacs:
|
||||
|
@ -3439,10 +3439,13 @@ def addFiles(filenames, prj_obj = None):
|
||||
os.chdir(filename)
|
||||
init_package_dir(prj_apiurl, prj_name, pac_dir, pac_dir, files=False)
|
||||
os.chdir(old_dir)
|
||||
|
||||
elif is_package_dir(filename) and conf.config['do_package_tracking']:
|
||||
print >>sys.stderr, 'osc: warning: \'%s\' is already under version control' % filename
|
||||
return 1
|
||||
elif os.path.isdir(filename) and is_project_dir(prj_dir):
|
||||
print >>sys.stderr, 'osc: cannot add a directory to a project unless ' \
|
||||
'\'do_package_tracking\' is enabled in the configuration file'
|
||||
return 1
|
||||
|
||||
pacs = findpacs(filenames)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user