diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-04-04 17:05:31 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-04-04 17:15:18 +0200 |
commit | bb373cf8689d7603259bc43fd6dd5f0f6caed87a (patch) | |
tree | 3bfa47ca86b0011fda6df2948b7c24c4ca2ab90a | |
parent | c4fc5ebe8df771a4350de2ea1d69e9775bc73ba5 (diff) |
buildpackage: Improve error message when using DEP14
-rwxr-xr-x | gbp/scripts/buildpackage.py | 2 | ||||
-rw-r--r-- | tests/22_test_gbp_buildpackage.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py index a29ba77e..00336832 100755 --- a/gbp/scripts/buildpackage.py +++ b/gbp/scripts/buildpackage.py @@ -368,7 +368,7 @@ def get_pbuilder_dist(options, repo, native=False): elif len(parts) == 1 and native and branch in ['master', 'sid']: dist = '' else: - raise GbpError("DEP14 DIST setup needs branch name to be vendor/suite") + raise GbpError("DEP14 DIST: Current branch '%s' does not match vendor/suite" % branch) else: dist = options.pbuilder_dist return dist diff --git a/tests/22_test_gbp_buildpackage.py b/tests/22_test_gbp_buildpackage.py index 7d5c756d..79645ac0 100644 --- a/tests/22_test_gbp_buildpackage.py +++ b/tests/22_test_gbp_buildpackage.py @@ -66,15 +66,15 @@ class TestGbpBuildpackageDep14(DebianGitTestRepo): self.repo.create_branch(branch) self.repo.set_branch(branch) with self.assertRaisesRegexp(GbpError, - 'DEP14 DIST setup needs branch name to be vendor/suite'): + "DEP14 DIST: Current branch 'sid' does not match vendor/suite"): get_pbuilder_dist(self.options, self.repo) def test_get_pbuilder_dist_dep14_too_many_slashes(self): - branch = 'too/many/slashed' + branch = 'too/many/slashes' self.repo.create_branch(branch) self.repo.set_branch(branch) with self.assertRaisesRegexp(GbpError, - 'DEP14 DIST setup needs branch name to be vendor/suite'): + "DEP14 DIST: Current branch 'too/many/slashes' does not match vendor/suite"): get_pbuilder_dist(self.options, self.repo) |