A new method named describe appeared in gbp
36341dda, so use it instead
of using customed describe method.
Change-Id: Ie9cf5f8c61246f957789a102930e3b81cafac98d
Reported-by: Hao H Huang <hao.h.huang@intel.com>
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
ret = self._git_getoutput('fetch', list(args))[1]
return not ret
- def describe(self, *args):
- """Show the most recent tag that is reachable from a commit
- """
- outs, ret = self._git_getoutput('describe', list(args))
- return ''.join(outs).strip() if not ret else None
-
def delete_tag(self, *args):
"""Delete a tag (or tags)"""
self._git_getoutput('tag', ['-d'] + list(args))
"""Delete all tags which belongs to the same commit"""
while 1:
- result = mygit.describe('--tags', '--exact-match', revision)
+ result = mygit.describe(revision, tags=True, exact_match=True)
if result:
mygit.push('origin', ':refs/tags/%s' % result, '-f')
mygit.delete_tag(result)
branch = event['branch']
if event['branch'] == 'master':
branch = 'trunk'
- tag = mygit.describe('--exact-match', '--match', 'submit/%s/*' %
- branch, event['patchset_revision'])
+ tag = mygit.describe(event['patchset_revision'], pattern='submit/%s/*'
+ % branch, exact_match=True)
return tag