/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/launchpad/cmds.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from __future__ import absolute_import
20
20
 
21
 
from brzlib import (
 
21
from breezy import (
22
22
    branch as _mod_branch,
23
23
    controldir,
24
24
    trace,
25
25
    )
26
 
from brzlib.commands import (
 
26
from breezy.commands import (
27
27
    Command,
28
28
    )
29
 
from brzlib.errors import (
 
29
from breezy.errors import (
30
30
    BzrCommandError,
31
31
    InvalidURL,
32
32
    NoPublicBranch,
33
33
    NotBranchError,
34
34
    )
35
 
from brzlib.i18n import gettext
36
 
from brzlib.option import (
 
35
from breezy.i18n import gettext
 
36
from breezy.option import (
37
37
    Option,
38
38
    ListOption,
39
39
    )
102
102
            author='',
103
103
            link_bug=None,
104
104
            dry_run=False):
105
 
        from brzlib.plugins.launchpad.lp_registration import (
 
105
        from breezy.plugins.launchpad.lp_registration import (
106
106
            BranchRegistrationRequest, BranchBugLinkRequest,
107
107
            DryRunLaunchpadService, LaunchpadService)
108
108
        if public_url is None:
173
173
            yield branch_url
174
174
 
175
175
    def _get_web_url(self, service, location):
176
 
        from brzlib.plugins.launchpad.lp_registration import (
 
176
        from breezy.plugins.launchpad.lp_registration import (
177
177
            NotLaunchpadBranch)
178
178
        for branch_url in self._possible_locations(location):
179
179
            try:
183
183
        raise NotLaunchpadBranch(branch_url)
184
184
 
185
185
    def run(self, location=None, dry_run=False):
186
 
        from brzlib.plugins.launchpad.lp_registration import (
 
186
        from breezy.plugins.launchpad.lp_registration import (
187
187
            LaunchpadService)
188
188
        if location is None:
189
189
            location = u'.'
221
221
 
222
222
    def run(self, name=None, no_check=False, verbose=False):
223
223
        # This is totally separate from any launchpadlib login system.
224
 
        from brzlib.plugins.launchpad import account
 
224
        from breezy.plugins.launchpad import account
225
225
        check_account = not no_check
226
226
 
227
227
        if name is None:
257
257
    takes_args = ['location?']
258
258
 
259
259
    def run(self, location='.'):
260
 
        from brzlib.plugins.launchpad import lp_api
261
 
        from brzlib.plugins.launchpad.lp_registration import LaunchpadService
 
260
        from breezy.plugins.launchpad import lp_api
 
261
        from breezy.plugins.launchpad.lp_registration import LaunchpadService
262
262
        branch, _ = _mod_branch.Branch.open_containing(location)
263
263
        service = LaunchpadService()
264
264
        launchpad = lp_api.login(service)
305
305
 
306
306
    def run(self, submit_branch=None, review=None, staging=False,
307
307
            message=None, approve=False, fixes=None):
308
 
        from brzlib.plugins.launchpad import lp_propose
 
308
        from breezy.plugins.launchpad import lp_propose
309
309
        tree, branch, relpath = controldir.ControlDir.open_containing_tree_or_branch(
310
310
            '.')
311
311
        if review is None:
349
349
    takes_options = ['revision']
350
350
 
351
351
    def run(self, revision=None):
352
 
        from brzlib import ui
353
 
        from brzlib.plugins.launchpad import lp_api
 
352
        from breezy import ui
 
353
        from breezy.plugins.launchpad import lp_api
354
354
        import webbrowser
355
355
        b = _mod_branch.Branch.open_containing('.')[0]
356
356
        pb = ui.ui_factory.nested_progress_bar()
371
371
            pb.finished()
372
372
 
373
373
    def _find_proposals(self, revision_id, pb):
374
 
        from brzlib.plugins.launchpad import (lp_api, lp_registration)
 
374
        from breezy.plugins.launchpad import (lp_api, lp_registration)
375
375
        # "devel" because branches.getMergeProposals is not part of 1.0 API.
376
376
        launchpad = lp_api.login(lp_registration.LaunchpadService(),
377
377
                                 version='devel')