From: Markus Lehtonen Date: Thu, 24 Apr 2014 06:27:53 +0000 (+0300) Subject: submit: refuse to submit from development branch X-Git-Tag: 0.22~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3788c97c43a7d29aa0dc57a41ec154bcef84ba6;p=tools%2Fgbs.git submit: refuse to submit from development branch The submit command now detects if the submission is done from the development branch of an orphan packaging branch and fails in this case. Submissions must be done from the packaging branch if the package is maintained using the orphan-packaging model. Change-Id: I8fdfe9c64f1e71b1d8e1a5cdfa1ad63e93378b75 Signed-off-by: Markus Lehtonen --- diff --git a/gitbuildsys/cmd_submit.py b/gitbuildsys/cmd_submit.py index aed1124..75940e1 100644 --- a/gitbuildsys/cmd_submit.py +++ b/gitbuildsys/cmd_submit.py @@ -22,6 +22,7 @@ import os import re import time +from gitbuildsys.conf import configmgr from gitbuildsys.utils import edit from gitbuildsys.errors import GbsError from gitbuildsys.log import LOGGER as log @@ -74,6 +75,13 @@ def main(args): workdir = args.gitdir + orphan_packaging = configmgr.get('packaging_branch', 'orphan-devel') + if orphan_packaging and args.commit == 'HEAD': + log.error("You seem to be submitting a development branch of an " + "(orphan) packaging branch. Please export your changes to the " + "packaging branch with 'gbs devel export' and submit from there.") + raise GbsError("Refusing to submit from devel branch") + message = args.msg if message is None: message = get_message()