Only remove master from request if it was requested

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2015-02-25 11:34:07 +00:00
parent 54097dc186
commit 12e10d8279

View file

@ -189,16 +189,17 @@ def branch_package(pkgname, branches):
if not os.path.exists(
os.path.join(GIT_FOLDER, '%s.git' % pkgname)):
_invoke(SETUP_PACKAGE, [pkgname])
branches.remove('master') # SETUP_PACKAGE creates master
fedmsg.publish(
topic='branch',
modname='git',
msg=dict(
agent='pkgdb',
name=pkgname,
branch='master',
),
)
if 'master' in branches:
branches.remove('master') # SETUP_PACKAGE creates master
fedmsg.publish(
topic='branch',
modname='git',
msg=dict(
agent='pkgdb',
name=pkgname,
branch='master',
),
)
# Create all the required branches for the package
# Use the translated branch name until pkgdb falls inline