I think the recommended name is actually 'lp-propose' now, but it does still have 'lp-submit' as an alias.
Anyway, the issue is probably in:
def canonical_url(object):
"""Return the canonical URL for a branch."""
scheme, netloc, path, params, query, fragment = urlparse.urlparse( str(object.self_link))
path = '/'.join(path.split('/')[2:])
netloc = netloc.replace('api.', 'code.')
return urlparse.urlunparse((scheme, netloc, path, params, query, fragment))
The issue being that 'self_link' is an api.... style url, but that isn't useful for opening a web browser.
In other code in bzr (or hydrazine?) I've seen "url.replace('api.launchpad.net/1.0', 'code.launchpad.net')"
Regardless, I think the *real* fix is to have Launchpad api objects give you a url that you can give to users, rather than trying to fake it in the wrapper code.
I think this can be fixed here, but I think it is also a launchpadlib issue, so I'll add that project.
I think the recommended name is actually 'lp-propose' now, but it does still have 'lp-submit' as an alias.
Anyway, the issue is probably in: url(object) :
str(object. self_link) ) path.split( '/')[2: ]) replace( 'api.', 'code.') urlunparse( (scheme, netloc, path, params, query,
fragment) )
def canonical_
"""Return the canonical URL for a branch."""
scheme, netloc, path, params, query, fragment = urlparse.urlparse(
path = '/'.join(
netloc = netloc.
return urlparse.
The issue being that 'self_link' is an api.... style url, but that isn't useful for opening a web browser.
In other code in bzr (or hydrazine?) I've seen "url.replace( 'api.launchpad. net/1.0' , 'code.launchpad .net')"
Regardless, I think the *real* fix is to have Launchpad api objects give you a url that you can give to users, rather than trying to fake it in the wrapper code.
I think this can be fixed here, but I think it is also a launchpadlib issue, so I'll add that project.