/brz-propose/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/brz-propose/trunk

« back to all changes in this revision

Viewing changes to launchpad.py

  • Committer: Jelmer Vernooij
  • Date: 2019-02-01 00:20:43 UTC
  • Revision ID: jelmer@jelmer.uk-20190201002043-h1wd7t9vg0gxur31
Fix support with newer verisons of brz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    lp_api,
45
45
    lp_registration,
46
46
    )
 
47
 
47
48
""")
48
49
from ...transport import get_transport
49
50
 
155
156
    def __init__(self, staging=False):
156
157
        self._staging = staging
157
158
        if staging:
158
 
            lp_instance = 'staging'
 
159
            lp_service_root = lp_api.uris.STAGING_SERVICE_ROOT
159
160
        else:
160
 
            lp_instance = 'production'
161
 
        self.launchpad = connect_launchpad(lp_instance)
 
161
            lp_service_root = lp_api.uris.LPNET_SERVICE_ROOT
 
162
        self.launchpad = lp_api.connect_launchpad(lp_service_root)
162
163
 
163
164
    @property
164
165
    def base_url(self):
390
391
            yield LaunchpadMergeProposal(mp)
391
392
 
392
393
 
393
 
def connect_launchpad(lp_instance='production'):
394
 
    service = lp_registration.LaunchpadService(lp_instance=lp_instance)
395
 
    return lp_api.login(service, version='devel')
396
 
 
397
 
 
398
394
class LaunchpadBazaarMergeProposalBuilder(MergeProposalBuilder):
399
395
 
400
396
    def __init__(self, lp_host, source_branch, target_branch, message=None,