mirror of
https://abf.rosa.ru/djam/abf-console-client-src.git
synced 2025-02-24 02:12:49 +00:00
Added -b option to 'abf create'
This commit is contained in:
parent
8d501f5834
commit
94f87c8b75
3 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
Name: abf-console-client
|
||||
Version: 1.14.1
|
||||
Version: 1.14.2
|
||||
Release: 1
|
||||
Summary: Console client for ABF (https://abf.rosalinux.ru)
|
||||
Group: System/Configuration/Packaging
|
||||
|
|
6
abf.py
6
abf.py
|
@ -244,6 +244,7 @@ def parse_command_line():
|
|||
parser_pull = subparsers.add_parser('create', help='Create project from SRPM')
|
||||
parser_pull.add_argument('srpm', action='store', help='srpm file')
|
||||
parser_pull.add_argument('owner', action='store', help='who will own the project')
|
||||
parser_pull.add_argument('-b', '--branch', action='append', help='create additional branch; can be set more than once.')
|
||||
parser_pull.set_defaults(func=create)
|
||||
|
||||
# add project to repository
|
||||
|
@ -766,6 +767,11 @@ def create():
|
|||
os.system("abf put -m 'Imported from SRPM'")
|
||||
os.system("git push -u origin master")
|
||||
|
||||
if command_line.branch:
|
||||
for branch in command_line.branch:
|
||||
os.system("git checkout -b " + branch);
|
||||
os.system("git push origin " + branch);
|
||||
|
||||
# Go back to initial dir and delete temp folder
|
||||
os.chdir(curdir)
|
||||
shutil.rmtree(tempdir)
|
||||
|
|
|
@ -572,7 +572,7 @@ class ProjectCreator(Model):
|
|||
}
|
||||
|
||||
log.debug('Creating project: ' + str(DATA))
|
||||
log.info("The project %s for owner %d has been created." % (name, owner_id) + str (DATA))
|
||||
log.info("The project %s for owner %d has been created." % (name, owner_id))
|
||||
try:
|
||||
result = models.jsn.new_project({'project': DATA})
|
||||
except BadRequestError, ex:
|
||||
|
|
Loading…
Add table
Reference in a new issue