~abentley/bzr/appenddir

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-02-11 11:49:25 UTC
  • mfrom: (5657.1.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20110211114925-r8vawh0c4vlf2tfo
(jelmer) Fix ``bzr lp-mirror`` to work on command line branch URLs and
 branches without an explicit public location. (Max Bowsher)

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
    def run(self, location='.'):
297
297
        from bzrlib.plugins.launchpad import lp_api
298
298
        from bzrlib.plugins.launchpad.lp_registration import LaunchpadService
299
 
        branch = _mod_branch.Branch.open(location)
 
299
        branch, _ = _mod_branch.Branch.open_containing(location)
300
300
        service = LaunchpadService()
301
301
        launchpad = lp_api.login(service)
302
 
        lp_branch = lp_api.load_branch(launchpad, branch)
303
 
        lp_branch.requestMirror()
 
302
        lp_branch = lp_api.LaunchpadBranch.from_bzr(launchpad, branch,
 
303
                create_missing=False)
 
304
        lp_branch.lp.requestMirror()
304
305
 
305
306
 
306
307
register_command(cmd_launchpad_mirror)