summaryrefslogtreecommitdiffhomepage
path: root/tests/11_test_dch_main.py
diff options
context:
space:
mode:
authorDaniel Gollub <dgollub@brocade.com>2015-03-17 08:12:53 +0100
committerGuido Günther <agx@sigxcpu.org>2015-04-25 09:19:56 +0200
commitaa8548d526397a3c4353b7212f3f848ab1f1e283 (patch)
tree1a5d0ee3741167bbf471b1fb04ba1797aa01a935 /tests/11_test_dch_main.py
parent4a53c0f5c5819fb26cd02d746f08d6d4f4ba18f0 (diff)
Guess upstream-tag based on merge-base
In some unfortunate cases you might have something like this: $ git tag v1.0 vyatta/1.0-0something1 ... where later tag is closer to describe current HEAD. With upstream-tag set to v%(version)s find_tag() is going to propose something based on vyatta/1.0-0something1 which is not expected. The problem is that find_tag() returns tags, which match the upstream-tag format, but which are not on the upstream-branch at all. To fix this find_tag()/git-describe should not be used to determine the closest upstream-tag. Closes: gh#7
Diffstat (limited to 'tests/11_test_dch_main.py')
-rw-r--r--tests/11_test_dch_main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/11_test_dch_main.py b/tests/11_test_dch_main.py
index 538d2e84..acea6920 100644
--- a/tests/11_test_dch_main.py
+++ b/tests/11_test_dch_main.py
@@ -57,6 +57,7 @@ class TestScriptDch(DebianGitTestRepo):
self.repo.create_tag("upstream/0.9", msg="upstream version 0.9")
self.add_file("bar", "foo")
self.repo.create_tag("upstream/1.0", msg="upstream version 1.0")
+ self.repo.create_branch("upstream")
self.repo.create_branch("debian")
self.repo.set_branch("debian")
self.upstream_tag = "upstream/%(version)s"
@@ -66,7 +67,7 @@ class TestScriptDch(DebianGitTestRepo):
self.add_file("debian/changelog", cl_debian)
self.add_file("debian/control", """Source: test-package\nSection: test\n""")
self.options = ["--upstream-tag=%s" % self.upstream_tag, "--debian-branch=debian",
- "--id-length=0", "--spawn-editor=/bin/true"]
+ "--upstream-branch=upstream", "--id-length=0", "--spawn-editor=/bin/true"]
self.repo.create_tag(deb_tag, msg=deb_tag_msg, commit="HEAD~1")