Simplify 'Tags <pattern>' by using regex on top of vcs.gettags()

This automagically enables support for pattern-based tags for all vcs types
that support Tags
This commit is contained in:
Daniel Martí 2014-02-10 12:20:22 +01:00
parent 08607a3cd4
commit 409188a4e5
2 changed files with 5 additions and 12 deletions

View file

@ -275,10 +275,6 @@ 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')
@ -356,11 +352,6 @@ 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):