lp-propose $BRANCH always prefers the parent branch

Bug #1078211 reported by John A Meinel
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

lp-propose uses this logic:
@staticmethod
def candidate_urls(bzr_branch):
    """Iterate through related URLs that might be Launchpad URLs.

    :param bzr_branch: A Bazaar branch to find URLs from.
    :return: a generator of URL strings.
    """
    url = bzr_branch.get_public_branch()
    if url is not None:
        yield url
    url = bzr_branch.get_push_location()
    if url is not None:
        yield url
    url = bzr_branch.get_parent()
    if url is not None:
        yield url
    yield bzr_branch.base

But that means if you do 'bzr lp-propose lp:~an/lp/branch' it will actually target that branch's parent. (So people who do: bzr branch lp:project lp:maintenance/series will end up having 'lp-propose lp:maintenance/series' targetting the trunk branch by default.)

You can get around this by setting a 'public_branch' the maintenance branch. However it seems non-obvious that manually specifying a branch would not use that branch.

I think it makes the most sense to stop using parent_branch by default. Even in the local mirror case it is only sometimes right. Having someone uses 'bzr config public_branch=...' if they want to use a local mirror seems better than having to set that for doing 'bzr lp-propose lp:project' or 'lp:project/series' not doing what you expect.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.