lp: shorthands do not work for private branches

Bug #261609 reported by Celso Providelo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned
Launchpad itself
Fix Released
Medium
Tim Penhey
Tarmac
Invalid
High
Unassigned

Bug Description

A remote and private branch is registered as https://code.edge.launchpad.net/~cprov/launchpad/bug-261325-p3a-baseurl and it fails when I try to merge (or branch) from it using its LP url, lp:~cprov/launchpad/bug-261325-p3a-baseurl

{{{
$ bzr merge lp:~cprov/launchpad/bug-261325-p3a-baseurl
bzr: ERROR: Not a branch: "bzr+ssh://<email address hidden>/~cprov/launchpad/".
}}}

I've ended up using the remote branch URL instead, bzr+ssh://devpad.canonical.com/code/cprov/launchpad/bug-261325-p3a-baseurl.

On the other hand, a public remote branch works just fine, https://code.edge.launchpad.net/~cprov/gits/cprov.

Related branches

Celso Providelo (cprov)
description: updated
Revision history for this message
Jonathan Lange (jml) wrote :

The issue here is that the XML-RPC service doesn't resolve private branches, since it doesn't have authentication.

Someone has filed another bug about this, but I haven't found it yet: this bug is a duplicate of that one.

Revision history for this message
Jonathan Lange (jml) wrote : Re: Cannot resolve private lp:~foo/bar/baz branches

I can't find the dupe for this -- I guess I imagined it.

Changed in launchpad-bazaar:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Cody A.W. Somerville (cody-somerville) wrote : Re: XML-RPC service doesn't resolve private branches

Another use case that fails is trying to use the project or project/series shorthand. For example, the following does not work:

bzr branch lp:bugsy

Nor does this work:

bzr branch lp:bugsy/development

Although there is a work around available, the OEM Services team would highly appreciate this fixed since most of our branches are private.

Revision history for this message
Tim Penhey (thumper) wrote :

Cody, we have something in progress that should help with this without exposing private data.

Revision history for this message
Robert Collins (lifeless) wrote :

What does bzr need to change?

Changed in bzr:
status: New → Incomplete
Revision history for this message
Jonathan Lange (jml) wrote :

bzr wouldn't need to change anything.

Changed in bzr:
status: Incomplete → Invalid
Revision history for this message
Jonathan Lange (jml) wrote :

I started trying to fix this a while ago in my spare time, but never followed it up. Here's the failing test I added: https://bazaar.launchpad.net/~jml/launchpad/plus-branch-codehosting/revision/7897

summary: - XML-RPC service doesn't resolve private branches
+ lp: shorthands do not work for private branches
tags: added: codehosting-ssh
Revision history for this message
Jonathan Lange (jml) wrote :

The plan was to allow URLs like bzr+ssh://bazaar.launchpad.net/+branch/foo to work, where /+branch/foo means "resolve to the same branch as lp:foo". We already have this style of path handling for the webapp (e.g. https://code.launchpad.net/+branch/bzr).

Because the redirect happens after authentication, we can support private branches in this fashion.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I don't think we can have bzr+ssh://bazaar.launchpad.net/+branch/foo "redirect" to the trunk branch, as the bzr protocol doesn't AIUI have a redirect. We could expose the trunk branch at +branch/foo though. I worry about doing that efficiently for HTTP though :/ -- I guess there we really can issue a redirect somehow or other.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 261609] Re: lp: shorthands do not work for private branches

On Tue, 2009-10-20 at 22:47 +0000, Michael Hudson wrote:
> I don't think we can have bzr+ssh://bazaar.launchpad.net/+branch/foo
> "redirect" to the trunk branch, as the bzr protocol doesn't AIUI have a
> redirect.

Branch aliases are an ok approximation. Such at those at
http://launchpad.net/product/series/.bzr/branch/

> We could expose the trunk branch at +branch/foo though. I
> worry about doing that efficiently for HTTP though :/ -- I guess there
> we really can issue a redirect somehow or other.
>

--

Paul Hummer (rockstar)
Changed in tarmac:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jonathan Lange (jml) wrote :

To continue work on my branch, you'll need to:
  * fix the failing test
  * do end-to-end integration tests for:
    * fetching private branches
    * pushing new branches to bzr+ssh://bazaar.launchpad.net/+branch/foo
    * pushing to existing branch at same

Tim Penhey (thumper)
Changed in launchpad-code:
status: Triaged → In Progress
assignee: nobody → Tim Penhey (thumper)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Ursula Junque (ursinha)
Changed in launchpad-code:
status: In Progress → Fix Committed
milestone: none → 10.09
Revision history for this message
Tim Penhey (thumper) wrote :

Part one tested.

tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Tim Penhey (thumper) wrote :

Working on the next bit :)

Changed in launchpad-code:
status: Fix Committed → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
Changed in launchpad-code:
status: In Progress → Fix Committed
Tim Penhey (thumper)
tags: added: qa-bad
removed: qa-needstesting
Tim Penhey (thumper)
tags: added: qa-ok
removed: qa-bad
Curtis Hovey (sinzui)
Changed in launchpad-code:
status: Fix Committed → Fix Released
dobey (dobey)
Changed in tarmac:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.