Support UCM:Tags <pattern> using git tag -l <pattern>

This commit is contained in:
Daniel Martí 2014-02-10 11:27:28 +01:00
parent 3f0dbe232c
commit 08607a3cd4
3 changed files with 19 additions and 5 deletions

View file

@ -275,6 +275,10 @@ class vcs:
def gettags(self):
raise VCSException('gettags not supported for this vcs type')
# Get a list of all known tags
def gettags_pattern(self, pattern):
raise VCSException('gettags with pattern not supported for this vcs type')
# Get current commit reference (hash, revision, etc)
def getref(self):
raise VCSException('getref not supported for this vcs type')
@ -352,6 +356,11 @@ class vcs_git(vcs):
p = FDroidPopen(['git', 'tag'], cwd=self.local)
return p.stdout.splitlines()
def gettags_pattern(self, pattern):
self.checkrepo()
p = FDroidPopen(['git', 'tag', '-l', pattern], cwd=self.local)
return p.stdout.splitlines()
class vcs_gitsvn(vcs):