From d3788c97c43a7d29aa0dc57a41ec154bcef84ba6 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 24 Apr 2014 09:27:53 +0300 Subject: [PATCH] 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 --- gitbuildsys/cmd_submit.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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() -- 2.34.1