summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-11-05 09:31:12 +0100
committerGuido Günther <agx@sigxcpu.org>2013-11-05 09:36:15 +0100
commitfc5b485ea5c431be6699afb84d60ee55fbc9c96d (patch)
treea7a157e6605352201efbd1c06f2eb81c975d5a17 /gbp
parentbabbc5e7721da27d92c519bfe1cf7829066cb2fe (diff)
downloadgit-buildpackage-fc5b485ea5c431be6699afb84d60ee55fbc9c96d.tar.gz
git-buildpackage-fc5b485ea5c431be6699afb84d60ee55fbc9c96d.tar.bz2
git-buildpackage-fc5b485ea5c431be6699afb84d60ee55fbc9c96d.zip
import-dsc: allow to skip Debian tag creation
Closes: #636368
Diffstat (limited to 'gbp')
-rw-r--r--gbp/scripts/import_dsc.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py
index 11c47e89..17443621 100644
--- a/gbp/scripts/import_dsc.py
+++ b/gbp/scripts/import_dsc.py
@@ -134,11 +134,12 @@ def apply_debian_patch(repo, unpack_dir, src, options, parents):
other_parents = parents,
author=author,
committer=committer)
- repo.create_tag(repo.version_to_tag(options.debian_tag, src.version),
- msg="Debian release %s" % src.version,
- commit=commit,
- sign=options.sign_tags,
- keyid=options.keyid)
+ if not options.skip_debian_tag:
+ repo.create_tag(repo.version_to_tag(options.debian_tag, src.version),
+ msg="Debian release %s" % src.version,
+ commit=commit,
+ sign=options.sign_tags,
+ keyid=options.keyid)
except (gbpc.CommandExecFailed, GitRepositoryError) as err:
msg = err.__str__() if len(err.__str__()) else ''
gbp.log.err("Failed to import Debian package: %s" % msg)
@@ -220,6 +221,10 @@ def parse_args(argv):
dest="debian_tag")
tag_group.add_config_file_option(option_name="upstream-tag",
dest="upstream_tag")
+ tag_group.add_option("--skip-debian-tag",dest="skip_debian_tag",
+ action="store_true", default=False,
+ help="Don't add a tag after importing the Debian patch")
+
import_group.add_config_file_option(option_name="filter",
dest="filters", action="append")
@@ -335,11 +340,12 @@ def main(argv):
author=author,
committer=committer)
- repo.create_tag(name=tag,
- msg=msg,
- commit=commit,
- sign=options.sign_tags,
- keyid=options.keyid)
+ if not (src.native and options.skip_debian_tag):
+ repo.create_tag(name=tag,
+ msg=msg,
+ commit=commit,
+ sign=options.sign_tags,
+ keyid=options.keyid)
if not src.native:
if is_empty:
repo.create_branch(options.upstream_branch, commit)