~bzr/ubuntu/lucid/bzr/beta-ppa

« back to all changes in this revision

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

  • Committer: Max Bowsher
  • Date: 2011-02-09 04:08:25 UTC
  • mfrom: (0.5074.6 lucid)
  • Revision ID: maxb@f2s.com-20110209040825-7jqm4i78b8ojoy9z
Merge beta-ppa into ppa upon release of 2.3.0.

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
 
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))