Rev 4874: (mbp) Fix broken communication with the Launchpad web service API when used in file:///home/pqm/archives/thelove/bzr/2.1/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Feb 2 08:58:06 UTC 2011
At file:///home/pqm/archives/thelove/bzr/2.1/
------------------------------------------------------------
revno: 4874 [merge]
revision-id: pqm at pqm.ubuntu.com-20110202085804-grm34yqhgsxqb8qu
parent: pqm at pqm.ubuntu.com-20101216154920-v9fy0t1arawtkdli
parent: maxb at f2s.com-20110201102338-pndv0tbm0ydzumfb
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.1
timestamp: Wed 2011-02-02 08:58:04 +0000
message:
(mbp) Fix broken communication with the Launchpad web service API when used
with launchpadlib >= 1.5.5 against production or dev. (Max Bowsher)
modified:
bzrlib/plugins/launchpad/lp_api.py lp_api.py-20090704082908-79il6zl4gugwl3wz-1
=== modified file 'bzrlib/plugins/launchpad/lp_api.py'
--- a/bzrlib/plugins/launchpad/lp_api.py 2010-11-26 18:10:01 +0000
+++ b/bzrlib/plugins/launchpad/lp_api.py 2011-02-01 10:23:38 +0000
@@ -69,10 +69,25 @@
installed_version, installed_version)
+# The older versions of launchpadlib only provided service root constants for
+# edge and staging, whilst newer versions drop edge. Therefore service root
+# URIs for which we do not always have constants are derived from the staging
+# one, which does always exist.
+#
+# It is necessary to derive, rather than use hardcoded URIs because
+# launchpadlib <= 1.5.4 requires service root URIs that end in a path of
+# /beta/, whilst launchpadlib >= 1.5.5 requires service root URIs with no path
+# info.
+#
+# Once we have a hard dependency on launchpadlib >= 1.5.4 we can replace all of
+# bzr's local knowledge of individual Launchpad instances with use of the
+# launchpadlib.uris module.
LAUNCHPAD_API_URLS = {
- 'production': 'https://api.launchpad.net/beta/',
+ 'production': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
+ 'api.launchpad.net'),
'staging': STAGING_SERVICE_ROOT,
- 'dev': 'https://api.launchpad.dev/beta/',
+ 'dev': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
+ 'api.launchpad.dev'),
}
More information about the bazaar-commits
mailing list