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 <markus.lehtonen@linux.intel.com>
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
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()