summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-12-17 17:39:59 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-12-19 14:10:43 +0200
commit04861fff93001d149c4bf69f475c9aa35a357b5d (patch)
treed153ec72eabc922a82df105983f8bb97b8716da1 /gbp
parent448b7bc977a25757c2301f3f10a2665d52939b5c (diff)
downloadgit-buildpackage-04861fff93001d149c4bf69f475c9aa35a357b5d.tar.gz
git-buildpackage-04861fff93001d149c4bf69f475c9aa35a357b5d.tar.bz2
git-buildpackage-04861fff93001d149c4bf69f475c9aa35a357b5d.zip
GitRepository.create_tag: add 'annotate' argument
For forcing the creation of annotated tags. Causes the an editor to be spawned if no message is given. Change-Id: I8ec7e195cf7ae997606af1d887f04e84a14b2abc Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp')
-rw-r--r--gbp/git/repository.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 7613d8f3..20251a00 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -700,7 +700,8 @@ class GitRepository(object):
#{ Tags
- def create_tag(self, name, msg=None, commit=None, sign=False, keyid=None):
+ def create_tag(self, name, msg=None, commit=None, sign=False, keyid=None,
+ annotate=False):
"""
Create a new tag.
@@ -715,15 +716,18 @@ class GitRepository(object):
@type sign: C{bool}
@param keyid: the GPG keyid used to sign the tag
@type keyid: C{str}
+ @param annotate: Create an annotated tag
+ @type annotate: C{bool}
"""
args = GitArgs()
args.add_true(msg, ['-m', msg])
if sign:
args.add('-s')
args.add_true(keyid, ['-u', keyid])
+ args.add_true(annotate, '-a')
args.add(name)
args.add_true(commit, commit)
- self._git_command("tag", args.args)
+ self._git_command("tag", args.args, interactive=True)
def delete_tag(self, tag):
"""