From f5267d7d5674d6980158174be5f5a1d9b6413485 Mon Sep 17 00:00:00 2001 From: Lingchaox Xin Date: Fri, 4 Jan 2013 19:02:50 +0800 Subject: [PATCH] Add delete_tags for job_deletetag.py, sorry for this Change-Id: Ib92b2c76ca5c80886a854584e2f7a2f1b16b665f --- common/git.py | 5 +++++ job_deletetag.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common/git.py b/common/git.py index 2a337d4..0c4a3b1 100644 --- a/common/git.py +++ b/common/git.py @@ -371,6 +371,11 @@ class Git: else: return None + def delete_tags(self, *args): + """Delete a tag (or tags)""" + with Workdir(self.path): + self._exec_git('tag -d', list(args)) + def pull(self, *args): """Fetch from and merge with another repository or a local branch """ diff --git a/job_deletetag.py b/job_deletetag.py index d251715..2f2bcc2 100755 --- a/job_deletetag.py +++ b/job_deletetag.py @@ -51,7 +51,7 @@ def deleteTags(mygit, revision): result = mygit.describe('--tags --exact-match %s' % revision) if result: mygit.push('origin :refs/tags/%s -f' % result) - mygit.delete_tag(result) + mygit.delete_tags(result) else: break; -- 2.7.4