~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-01-11 04:33:12 UTC
  • mto: (5582.12.2 weave-plugin)
  • mto: This revision was merged to the branch mainline in revision 5718.
  • Revision ID: jelmer@samba.org-20110111043312-g4wx6iuf9662f36d
Move weave formats into bzrlib.plugins.weave_fmt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
import urlparse
19
18
import webbrowser
20
19
 
21
20
from bzrlib import (
27
26
    lp_api,
28
27
    lp_registration,
29
28
)
 
29
from bzrlib.plugins.launchpad.lp_api import canonical_url
30
30
 
31
31
from lazr.restfulclient import errors as restful_errors
32
32
 
74
74
        if staging:
75
75
            lp_instance = 'staging'
76
76
        else:
77
 
            lp_instance = 'edge'
 
77
            lp_instance = 'production'
78
78
        service = lp_registration.LaunchpadService(lp_instance=lp_instance)
79
79
        self.launchpad = lp_api.login(service)
80
80
        self.source_branch = lp_api.LaunchpadBranch.from_bzr(
217
217
        old_tree):
218
218
        if c and k == 'file':
219
219
            yield str(path)
220
 
 
221
 
 
222
 
def canonical_url(object):
223
 
    """Return the canonical URL for a branch."""
224
 
    scheme, netloc, path, params, query, fragment = urlparse.urlparse(
225
 
        str(object.self_link))
226
 
    path = '/'.join(path.split('/')[2:])
227
 
    netloc = netloc.replace('api.', 'code.')
228
 
    return urlparse.urlunparse((scheme, netloc, path, params, query,
229
 
                                fragment))