pull does not understand lp: URLs in branch.conf

Bug #534787 reported by Gordon Tyler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Gordon Tyler
QBzr
Invalid
Undecided
Unassigned

Bug Description

My branch.conf for a local branch looks like this:

parent_location = lp:bzr-mac-installers/2.1

And my system location.conf contains the following:

[C:/dev/bzr-mac-installers]
submit_branch = lp:bzr-mac-installers
pull_location = lp:bzr-mac-installers
pull_location:policy = appendpath
push_location = lp:bzr-mac-installers
push_location:policy = appendpath
public_branch = lp:bzr-mac-installers
public_branch:policy = appendpath

When I use 'bzr push' in C:/dev/bzr-mac-installers/2.1 it works just fine. However, when I use 'bzr pull', I get the following:

Using saved parent location: C:/dev/bzr-mac-installers/2.1/lp:bzr-mac-installers/2.1
bzr: ERROR: Not a branch: "C:/dev/bzr-mac-installers/2.1/lp:bzr-mac-installers/2.1/".

Tags: easy

Related branches

Gordon Tyler (doxxx)
description: updated
Revision history for this message
Alexander Belchenko (bialix) wrote :

I've just put lp:qbzr/0.18 into the branch.conf of my qbzr development branch.

Trying standard bzr commands:

C:\work\Bazaar\plugins\qbzr>bzr info
Lightweight checkout (format: 2a)
Location:
  light checkout root: .
   checkout of branch: .bzr/branches/0.18
    shared repository: .bzr/branches

Related branches:
  parent branch: .bzr/branches/0.18/lp:qbzr/0.18

C:\work\Bazaar\plugins\qbzr>bzr pull
Using saved parent location: C:/work/Bazaar/plugins/qbzr/.bzr/branches/0.18/lp:qbzr/0.18
bzr: ERROR: Not a branch: "C:/work/Bazaar/plugins/qbzr/.bzr/branches/0.18/lp:qbzr/0.18/".

So as I can see the standard bzr behavior is the same as qbzr one: bzr don't understand directory services in branch.conf. And because qbzr just uses bzr API we get the same problems as bzr core has.

Based on your bug report I don't understand how it actually works for you with plain `bzr pull`.

I'm inclined to mark this bug as Invalid for QBzr or re-assign it to bzr core.

Changed in qbzr:
status: New → Incomplete
Revision history for this message
Gordon Tyler (doxxx) wrote :

It seems that this is indeed a bug in core bzr. It works for 'bzr push' but not 'bzr pull':

C:\dev\bzr-mac-installers\2.1>bzr info
Repository tree (format: 2a)
Location:
  shared repository: C:/dev/bzr-mac-installers
  repository branch: .

Related branches:
  public branch: lp:bzr-mac-installers/2.1
    push branch: lp:bzr-mac-installers/2.1
  parent branch: lp:bzr-mac-installers/2.1
  submit branch: lp:bzr-mac-installers

C:\dev\bzr-mac-installers\2.1>bzr pull
Using saved parent location: C:/dev/bzr-mac-installers/2.1/lp:bzr-mac-installers/2.1
bzr: ERROR: Not a branch: "C:/dev/bzr-mac-installers/2.1/lp:bzr-mac-installers/2.1/".

C:\dev\bzr-mac-installers\2.1>bzr push
Using saved push location: lp:bzr-mac-installers/2.1
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
No new revisions to push.

Changed in qbzr:
status: Incomplete → Invalid
summary: - qpull does not understand lp: URLs in branch.conf
+ pull does not understand lp: URLs in branch.conf
description: updated
Revision history for this message
Vincent Ladeuil (vila) wrote :

@Gordon, since you confirmed that the bug is in bzr-core, you can just as well change the status and the importance.
I trust your judgment here :)

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
tags: added: easy
Revision history for this message
Gordon Tyler (doxxx) wrote :

So Branch.get_parent() uses urlutils.join() to join the branch base dir and the parent location, I guess in case the parent location is a relative dir (e.g. ../trunk). However, urlutils.join() doesn't recognize lp:blah as an absolute URL, which it would treat specially and return without concatenating. The regex it uses to detect URLs assumes something like "scheme://path".

Gordon Tyler (doxxx)
Changed in bzr:
assignee: nobody → Gordon Tyler (doxxx)
Martin Pool (mbp)
Changed in bzr:
status: Confirmed → In Progress
John A Meinel (jameinel)
Changed in bzr:
milestone: none → 2.2b4
status: In Progress → Fix Released
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.