Merge lp:~jelmer/bzr-builddeb/svn-bp-tag-name into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Approved by: James Westby
Approved revision: 636
Merged at revision: 635
Proposed branch: lp:~jelmer/bzr-builddeb/svn-bp-tag-name
Merge into: lp:bzr-builddeb
Diff against target: 81 lines (+18/-3)
3 files modified
debian/changelog (+5/-1)
tests/test_upstream.py (+7/-1)
upstream/pristinetar.py (+6/-1)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/svn-bp-tag-name
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+79405@code.launchpad.net

Description of the change

Support upstream_VERSION, which is used to store upstream versions by
svn-buildpackage.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-10-13 20:03:41 +0000
3+++ debian/changelog 2011-10-14 14:57:57 +0000
4@@ -17,7 +17,11 @@
5 [ Martin Packman ]
6 * Fix test_utf8_changelog when run with older versions of python-debian.
7
8- -- Jelmer Vernooij <jelmer@debian.org> Tue, 27 Sep 2011 02:40:03 +0200
9+ [ Jelmer Vernooij ]
10+ * Support svn-buildpackage tag names to find upstream versions.
11+ LP: #874263
12+
13+ -- Jelmer Vernooij <jelmer@debian.org> Fri, 14 Oct 2011 16:16:46 +0200
14
15 bzr-builddeb (2.7.9) unstable; urgency=low
16
17
18=== modified file 'tests/test_upstream.py'
19--- tests/test_upstream.py 2011-10-11 15:31:02 +0000
20+++ tests/test_upstream.py 2011-10-14 14:57:57 +0000
21@@ -708,6 +708,9 @@
22 def test_git_upstream(self):
23 self.assertTrue(is_upstream_tag('upstream/2.1'))
24
25+ def test_svn_upstream(self):
26+ self.assertTrue(is_upstream_tag('upstream_2.1'))
27+
28
29 class TestUpstreamTagVersion(TestCase):
30
31@@ -718,6 +721,9 @@
32 self.assertEqual((None, '2.1'),
33 upstream_tag_version('upstream-debian-2.1'))
34
35+ def test_svn_upstream(self):
36+ self.assertEqual((None, '2.1'), upstream_tag_version('upstream_2.1'))
37+
38 def test_git_upstream(self):
39 self.assertEqual((None, '2.1'), upstream_tag_version('upstream/2.1'))
40
41@@ -751,7 +757,7 @@
42
43 def test_version(self):
44 self.assertEquals(['upstream-3.3', 'upstream-debian-3.3',
45- 'upstream-ubuntu-3.3', 'upstream/3.3'],
46+ 'upstream-ubuntu-3.3', 'upstream/3.3', 'upstream_3.3'],
47 self.source.possible_tag_names("3.3", component=None))
48
49 def test_version_component(self):
50
51=== modified file 'upstream/pristinetar.py'
52--- upstream/pristinetar.py 2011-09-27 00:48:16 +0000
53+++ upstream/pristinetar.py 2011-10-14 14:57:57 +0000
54@@ -340,6 +340,8 @@
55 if component is None:
56 # compatibility with git-buildpackage
57 tags += ["upstream/%s" % version]
58+ # compatibility with svn-buildpackage
59+ tags += ["upstream_%s" % version]
60 return tags
61
62 def has_pristine_tar_delta(self, rev):
63@@ -427,7 +429,8 @@
64 :param tag: The string name of the tag.
65 :return: True if the tag name is one generated by upstream tag operations.
66 """
67- return tag.startswith('upstream-') or tag.startswith('upstream/')
68+ return (tag.startswith('upstream-') or tag.startswith('upstream/') or
69+ tag.startswith('upstream_'))
70
71
72 def upstream_tag_version(tag):
73@@ -439,6 +442,8 @@
74 assert is_upstream_tag(tag), "Not an upstream tag: %s" % tag
75 if tag.startswith('upstream/'):
76 tag = tag[len('upstream/'):]
77+ elif tag.startswith('upstream_'):
78+ tag = tag[len('upstream_'):]
79 elif tag.startswith('upstream-'):
80 tag = tag[len('upstream-'):]
81 if tag.startswith('debian-'):

Subscribers

People subscribed via source and target branches