Merge lp:~jelmer/brz/shortcuts into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/shortcuts
Merge into: lp:brz
Diff against target: 110 lines (+5/-35)
3 files modified
breezy/plugins/launchpad/lp_directory.py (+0/-14)
breezy/plugins/launchpad/test_lp_directory.py (+0/-21)
doc/en/release-notes/brz-3.0.txt (+5/-0)
To merge this branch: bzr merge lp:~jelmer/brz/shortcuts
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+358291@code.launchpad.net

Commit message

Drop support for ubuntu:X/package shortcuts, where X is a single letter representing a Ubuntu release.

Description of the change

Drop support for ubuntu:X/package shortcuts, where X is a single letter representing a Ubuntu release.

Bazaar's dict of these mappings was static and had not been updated since natty. There is now also
ambiguity in these mappings, since we have both "dapper" and "disco". Depending on the version
of Bazaar/Breezy you're running this could resolve to either one.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/plugins/launchpad/lp_directory.py'
2--- breezy/plugins/launchpad/lp_directory.py 2018-08-01 21:10:58 +0000
3+++ breezy/plugins/launchpad/lp_directory.py 2018-11-13 02:34:01 +0000
4@@ -48,16 +48,6 @@
5 transport.register_urlparse_netloc_protocol('bzr+ssh')
6 transport.register_urlparse_netloc_protocol('lp')
7
8-_ubuntu_series_shortcuts = {
9- 'n': 'natty',
10- 'm': 'maverick',
11- 'l': 'lucid',
12- 'k': 'karmic',
13- 'j': 'jaunty',
14- 'h': 'hardy',
15- 'd': 'dapper',
16- }
17-
18
19 class LaunchpadDirectory(object):
20
21@@ -118,11 +108,9 @@
22 if scheme in ('ubuntu', 'debianlp'):
23 if scheme == 'ubuntu':
24 distro = 'ubuntu'
25- distro_series = _ubuntu_series_shortcuts
26 elif scheme == 'debianlp':
27 distro = 'debian'
28 # No shortcuts for Debian distroseries.
29- distro_series = {}
30 else:
31 raise AssertionError('scheme should be ubuntu: or debianlp:')
32 # Split the path. It's either going to be 'project' or
33@@ -142,8 +130,6 @@
34 # There are either 0 or > 2 path parts, neither of which is
35 # supported for these schemes.
36 raise InvalidURL('Bad path: %s' % url)
37- # Expand any series shortcuts, but keep unknown series.
38- series = distro_series.get(series, series)
39 # Hack the url and let the following do the final resolution.
40 url = lp_url_template % dict(
41 distro=distro,
42
43=== modified file 'breezy/plugins/launchpad/test_lp_directory.py'
44--- breezy/plugins/launchpad/test_lp_directory.py 2018-08-01 21:10:58 +0000
45+++ breezy/plugins/launchpad/test_lp_directory.py 2018-11-13 02:34:01 +0000
46@@ -594,49 +594,28 @@
47 def test_ubuntu_natty_distroseries_expansion(self):
48 self.assertURL('ubuntu/natty/foo', 'ubuntu:natty/foo', series='natty')
49
50- def test_ubuntu_n_distroseries_expansion(self):
51- self.assertURL('ubuntu/natty/foo', 'ubuntu:n/foo', series='natty')
52-
53 def test_ubuntu_maverick_distroseries_expansion(self):
54 self.assertURL('ubuntu/maverick/foo', 'ubuntu:maverick/foo',
55 series='maverick')
56
57- def test_ubuntu_m_distroseries_expansion(self):
58- self.assertURL('ubuntu/maverick/foo', 'ubuntu:m/foo', series='maverick')
59-
60 def test_ubuntu_lucid_distroseries_expansion(self):
61 self.assertURL('ubuntu/lucid/foo', 'ubuntu:lucid/foo', series='lucid')
62
63- def test_ubuntu_l_distroseries_expansion(self):
64- self.assertURL('ubuntu/lucid/foo', 'ubuntu:l/foo', series='lucid')
65-
66 def test_ubuntu_karmic_distroseries_expansion(self):
67 self.assertURL('ubuntu/karmic/foo', 'ubuntu:karmic/foo',
68 series='karmic')
69
70- def test_ubuntu_k_distroseries_expansion(self):
71- self.assertURL('ubuntu/karmic/foo', 'ubuntu:k/foo', series='karmic')
72-
73 def test_ubuntu_jaunty_distroseries_expansion(self):
74 self.assertURL('ubuntu/jaunty/foo', 'ubuntu:jaunty/foo',
75 series='jaunty')
76
77- def test_ubuntu_j_distroseries_expansion(self):
78- self.assertURL('ubuntu/jaunty/foo', 'ubuntu:j/foo', series='jaunty')
79-
80 def test_ubuntu_hardy_distroseries_expansion(self):
81 self.assertURL('ubuntu/hardy/foo', 'ubuntu:hardy/foo', series='hardy')
82
83- def test_ubuntu_h_distroseries_expansion(self):
84- self.assertURL('ubuntu/hardy/foo', 'ubuntu:h/foo', series='hardy')
85-
86 def test_ubuntu_dapper_distroseries_expansion(self):
87 self.assertURL('ubuntu/dapper/foo', 'ubuntu:dapper/foo',
88 series='dapper')
89
90- def test_ubuntu_d_distroseries_expansion(self):
91- self.assertURL('ubuntu/dapper/foo', 'ubuntu:d/foo', series='dapper')
92-
93 # Debian default distro series.
94
95 def test_debian_default_distroseries_expansion(self):
96
97=== modified file 'doc/en/release-notes/brz-3.0.txt'
98--- doc/en/release-notes/brz-3.0.txt 2018-09-18 02:08:46 +0000
99+++ doc/en/release-notes/brz-3.0.txt 2018-11-13 02:34:01 +0000
100@@ -67,6 +67,11 @@
101 has been renamed to ``transform.orphan_policy``.
102 (Jelmer Vernooij)
103
104+ * One-letter shortcuts for Ubuntu releases are no
105+ longer supported after 'ubuntu:'. Bazaar's mapping for
106+ one-letter distroseries had not been updated since natty.
107+ (Jelmer Vernooij)
108+
109 New Features
110 ************
111

Subscribers

People subscribed via source and target branches