Merge lp:~james-w/bzr-pqm/fix-service-roots into lp:bzr-pqm

Proposed by James Westby
Status: Merged
Merged at revision: not available
Proposed branch: lp:~james-w/bzr-pqm/fix-service-roots
Merge into: lp:bzr-pqm
Diff against target: 65 lines (+9/-14)
2 files modified
lpland.py (+4/-9)
test_lpland.py (+5/-5)
To merge this branch: bzr merge lp:~james-w/bzr-pqm/fix-service-roots
Reviewer Review Type Date Requested Status
Martin Pool (community) Approve
Review via email: mp+22540@code.launchpad.net

Description of the change

Hi,

This removes an XXX from jml and fixes a bug at the same time.

Since the multi-version change the hardcoded values for service
roots were incorrect.

The ones in launchpad.uris should be old enough that everyone has
that version.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lpland.py'
2--- lpland.py 2010-01-20 06:29:44 +0000
3+++ lpland.py 2010-03-31 14:45:33 +0000
4@@ -18,8 +18,10 @@
5
6 import os
7
8-from launchpadlib.launchpad import (
9- Launchpad, EDGE_SERVICE_ROOT, STAGING_SERVICE_ROOT)
10+from launchpadlib.launchpad import Launchpad
11+from launchpadlib.uris import (
12+ DEV_SERVICE_ROOT, EDGE_SERVICE_ROOT,
13+ LPNET_SERVICE_ROOT, STAGING_SERVICE_ROOT)
14 from lazr.uri import URI
15 from bzrlib import msgeditor
16 from bzrlib.errors import BzrCommandError
17@@ -27,13 +29,6 @@
18 from bzrlib import smtp_connection
19
20
21-# XXX: JonathanLange 2009-09-24: Both of these are available in more recent
22-# versions of launchpadlib. When we start using such versions, we should
23-# instead import these from launchpadlib.
24-DEV_SERVICE_ROOT = 'https://api.launchpad.dev/beta/'
25-LPNET_SERVICE_ROOT = 'https://api.launchpad.net/beta/'
26-
27-
28 class MissingReviewError(Exception):
29 """Raised when we try to get a review message without enough reviewers."""
30
31
32=== modified file 'test_lpland.py'
33--- test_lpland.py 2010-01-21 23:06:56 +0000
34+++ test_lpland.py 2010-03-31 14:45:33 +0000
35@@ -7,7 +7,9 @@
36
37 import unittest
38
39-from launchpadlib.launchpad import EDGE_SERVICE_ROOT, STAGING_SERVICE_ROOT
40+from launchpadlib.uris import (
41+ DEV_SERVICE_ROOT, EDGE_SERVICE_ROOT, LPNET_SERVICE_ROOT,
42+ STAGING_SERVICE_ROOT)
43
44 from bzrlib.plugins.pqm.lpland import (
45 get_bazaar_host, get_bugs_clause, get_reviewer_clause,
46@@ -169,8 +171,7 @@
47 def test_dev_service(self):
48 # The Bazaar host for the dev service is bazaar.launchpad.dev.
49 self.assertEqual(
50- 'bazaar.launchpad.dev',
51- get_bazaar_host('https://api.launchpad.dev/beta/'))
52+ 'bazaar.launchpad.dev', get_bazaar_host(DEV_SERVICE_ROOT))
53
54 def test_edge_service(self):
55 # The Bazaar host for the edge service is bazaar.launchpad.net, since
56@@ -181,8 +182,7 @@
57 def test_production_service(self):
58 # The Bazaar host for the production service is bazaar.launchpad.net.
59 self.assertEqual(
60- 'bazaar.launchpad.net',
61- get_bazaar_host('https://api.launchpad.net/beta/'))
62+ 'bazaar.launchpad.net', get_bazaar_host(LPNET_SERVICE_ROOT))
63
64 def test_staging_service(self):
65 # The Bazaar host for the staging service is

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: