aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-buildpackage
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2006-12-10 16:07:37 +0100
committerGuido Guenther <agx@bogon.sigxcpu.org>2006-12-10 16:07:37 +0100
commitff7797932f04a625d92d7e63e9af5bfbe1076a9d (patch)
treea17fcd130ef15482f6a4823b95b50ac2043b7a46 /git-buildpackage
parent093704c9c7e16d71659c49661ce91c605bfabd45 (diff)
git-buildpackage: detect the branch we're on and bail out if it's not the debian branchdebian/0.2.18
Diffstat (limited to 'git-buildpackage')
-rwxr-xr-xgit-buildpackage9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-buildpackage b/git-buildpackage
index 25c4a8be..9f1c6d9c 100755
--- a/git-buildpackage
+++ b/git-buildpackage
@@ -63,6 +63,8 @@ def main(argv):
help="command to build the package e.g. default is '%(builder)s'")
parser.add_config_file_option(option_name="upstream-branch", dest="upstream_branch",
help="upstream branch, default is '%(upstream-branch)s'")
+ parser.add_config_file_option(option_name="debian-branch", dest='debian_branch',
+ help="branch the debian patch is being developed on, default is '%(debian-branch)s'")
parser.add_config_file_option(option_name="sign-tags", dest="sign_tag",
help="sign git tags", action="store_true")
parser.add_config_file_option(option_name="keyid", dest="keyid",
@@ -85,11 +87,18 @@ def main(argv):
print >>sys.stderr, out
print >>sys.stderr, "Use --git-ignore-new to ignore."
return 1
+ branch=get_repository_branch('.')
+ if branch != options.debian_branch and not options.ignore_new:
+ print >>sys.stderr, "You are not on branch '%s' but on '%s'" % (options.debian_branch, branch)
+ print >>sys.stderr, "Use --git-ignore-new to ignore or --git-debian-branch to set the branch name."
+ return 1
+
cp = parse_changelog('debian/changelog')
if not is_native(cp) and not has_orig(cp, output_dir):
print "%s does not exist, creating from branch %s" % (orig_file(cp), options.upstream_branch)
if not create_orig(cp, output_dir, options.upstream_branch):
return 1
+
Command(options.build_cmd,[ '-i.git', '-I.git' ]+dpkg_args)()
if options.tag:
try: