/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 bzrlib/plugins/launchpad/lp_propose.py

  • Committer: Martin von Gagern
  • Date: 2010-04-22 07:18:02 UTC
  • mfrom: (5171 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5240.
  • Revision ID: martin.vgagern@gmx.net-20100422071802-utv4o54js0zyp5xv
mergeĀ fromĀ trunk

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
18
19
import webbrowser
19
20
 
20
21
from bzrlib import (
202
203
 
203
204
def canonical_url(object):
204
205
    """Return the canonical URL for a branch."""
205
 
    url = object.self_link.replace('https://api.', 'https://code.')
206
 
    return url.replace('/beta/', '/')
 
206
    scheme, netloc, path, params, query, fragment = urlparse.urlparse(
 
207
        str(object.self_link))
 
208
    path = '/'.join(path.split('/')[2:])
 
209
    netloc = netloc.replace('api.', 'code.')
 
210
    return urlparse.urlunparse((scheme, netloc, path, params, query,
 
211
                                fragment))