aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRichard Laager <rlaager@wiktel.com>2020-08-12 21:59:23 -0500
committerGuido Günther <agx@sigxcpu.org>2020-09-09 10:53:33 +0200
commit064834b994ef8ef30434f1a6c5765531313ca5bd (patch)
tree596160b08cd80133e61fb84842e439fb203dbb8f
parent707ebdfd620ba065533b420e0d401546dadf4f32 (diff)
import-orig: Refactor vcs_tag_parent
This makes the "tag" variable just the tag. This improves the human-readability of the error message if the tag cannot be found.
-rw-r--r--gbp/deb/git.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/deb/git.py b/gbp/deb/git.py
index a7015893..4a17c2db 100644
--- a/gbp/deb/git.py
+++ b/gbp/deb/git.py
@@ -378,8 +378,8 @@ class DebianGitRepository(PkgGitRepository):
if not vcs_tag_format:
return None
try:
- tag = "%s^{}" % self.version_to_tag(vcs_tag_format, version)
- return [self.rev_parse(tag)]
+ tag = self.version_to_tag(vcs_tag_format, version)
+ return [self.rev_parse("%s^{}" % tag)]
except GitRepositoryError:
raise GitRepositoryError("Can't find upstream vcs tag at '%s'" % tag)