How to find branches that stop a branch being deleted

Asked by Russel Winder

I have recently created a number of automated mirror branches to replace the manual mirror branches I had. Launchpad is though refusing to let me delete the old mirror branches as there are dependents. How can one find these dependents so that they can be deleted?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Russel Winder
Solved:
Last query:
Last reply:
Revision history for this message
Max Bowsher (maxb) said :
#1

Hi Russel,
Please provide links to each branch you are trying to delete.

Revision history for this message
Russel Winder (russel) said :
#2

Max,

It's some of my old manual mirrors of non-Bazaar branches that now have automated mirrors:

lp:~unison/unison/trunk

but I think lp:~unison/unison/bzrbuild may be the problem here. I'll have to check to see if it is actually a feature branch not updated for a year or just an old mirror that hasn't been updated. Given it hasn't been touched for a year I can't see it being anything other than redundant.

lp:~russel/groovy/trunk

claims it has 1 branch sharing revisions, but I haven't a clue which it is, and with DVCS it is not entirely clear that it is possible to find out unless Launchpad keeps a record.

Revision history for this message
Max Bowsher (maxb) said :
#3

Russel,

Per the related bug I've linked to this question, it's not possible to directly ask Launchpad which branches are stacked on a branch, so in the general case you'd need a Launchpad admin to query the DB directly. However, because it's rather unusual for branches to be stacked cross-project, and many projects have a manageable number of branches, you can view each branch's web page, and check what it says under the "Stacked on:" heading.

In this case, lp:~unison/unison/bzrbuild is indeed stacked on lp:~unison/unison/trunk.

Regarding that branch, the situation is somewhat complicated by the fact that the base branch has been upgraded to 2a, whilst the stacked branch is still a 1.x format, causing bzr to choke when it tries to access it. I don't know how to recover from this situation, or if it is indeed possible.

For the other, lp:~jelmer/groovy/import is stacked on lp:~russel/groovy/trunk.

That looks like it's just a stale import branch, so you can probably just ask jelmer to delete it.

Revision history for this message
Max Bowsher (maxb) said :
#4

Actually, I think the bzrbuild branch can be sorted out with:

bzr upgrade lp:~unison/unison/bzrbuild

bzr reconfigure --stacked-on=bzr+ssh://bazaar.launchpad.net/~unison/unison/trunk_mirror lp:~unison/unison/bzrbuild

At which point (after Launchpad is done scanning the changes to the branch), it ought to let you delete ~unison/unison/trunk.

Revision history for this message
Russel Winder (russel) said :
#5

Re: lp:~unison/unison/bzrbuild being stacked on lp:~unison/unison/trunk, I took a risk and just deleted both, in the right order. Is there a question to be asked here of the Bazaar folk about what happens when a stacked branch is updated and the stacked-on branch is not?

Re: lp:~jelmer/groovy/import being stacked on lp:~russel/groovy/trunk, Jelmer has deleted his branch of Groovy Trunk, but I still cannot delete mine. The message is the same "This branch cannot be deleted as it has 1 branch sharing revisions." I guess that lp:~chanwit/groovy/ck1 must be involved? I don't see a "stacked on" label on its page though.

Revision history for this message
Max Bowsher (maxb) said :
#6

Re: lp:~unison/unison/bzrbuild, I asked the question of #bzr and apparently the answer is to just upgrade the stacked-on branch. I happened to test this before you deleted it, and kept a copy, so I've re-pushed the branch to lp:~maxb/unison/bzrbuild for posterity.

Re: lp:~russel/groovy/trunk, hmm. lp:~chanwit/groovy/ck1 doesn't *look* stacked based on its branch.conf. I guess we'll have to ask around in the Launchpad Code team on how to dig the info out of the DB, and then get a LOSA to run the query.

Revision history for this message
Max Bowsher (maxb) said :
#7

Hi Russel,

So checking back on this question, it looks like lp:~chanwit/groovy/ck1 has been deleted at some point, but lp:~jelmer/groovy/import was either never deleted or has been re-pushed, and is stacked on the branch you want to delete, lp:~russel/groovy/trunk.

What do you want to do with this question? I suggest following up with Jelmer and figuring out what's going on with the branch that was supposedly deleted, if you want to proceed with trying to get rid of lp:~russel/groovy/trunk.

Revision history for this message
Jelmer Vernooij (jelmer) said :
#8

On Mon, 2010-06-28 at 17:09 +0000, Max Bowsher wrote:
> So checking back on this question, it looks like lp:~chanwit/groovy/ck1
> has been deleted at some point, but lp:~jelmer/groovy/import was either
> never deleted or has been re-pushed, and is stacked on the branch you
> want to delete, lp:~russel/groovy/trunk.
>
> What do you want to do with this question? I suggest following up with
> Jelmer and figuring out what's going on with the branch that was
> supposedly deleted, if you want to proceed with trying to get rid of
> lp:~russel/groovy/trunk.
I thought I had deleted the branch earlier but apparently I hadn't. It's
removed now though.

Cheers,

Jelmer

Revision history for this message
Max Bowsher (maxb) said :
#9

OK Russel, is your branch deleteable now, or do we need to figure out how to ask the Launchpad DB what the problem branch is?

Revision history for this message
Russel Winder (russel) said :
#10

Indeed, I emailed Chanwit and suggested he delete the branch he hadn't used in 2 years and he was good enough to oblige by return of email. Jelmer has now done his bit so that is good :-)

I have now been able to delete the branch. Result.

Thanks all.