Commit 3da92ba2 authored by Guido Günther's avatar Guido Günther

import-orig: Better error message when vcs-tag is not found

Closes: #896654
parent e730865c
......@@ -367,7 +367,11 @@ class DebianGitRepository(PkgGitRepository):
def vcs_tag_parent(self, vcs_tag_format, version):
"""If linking to the upstream VCS get the commit id"""
if vcs_tag_format:
return [self.rev_parse("%s^{}" % self.version_to_tag(vcs_tag_format, version))],
tag = "%s^{}" % self.version_to_tag(vcs_tag_format, version)
return [self.rev_parse(tag)]
except GitRepositoryError:
raise GitRepositoryError("Can't find upstream vcs tag at '%s'" % tag)
return None
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment