Handling branch interdependencies

Asked by TimeHorse

I have two lines of experimental development in two branches, let's call them A and B. However, I have reached a point in my development that a change in A would effect B. Specifically, if A is implemented, some of B's code will be written one way; if A is not implemented, B will be implemented another way. What is the best way of developing A, B-without-A (pure B) and B-dependent-A where most of the code should be shared between B-without-A and B-dependent-A? If I branch B to create B-dependent-A (let the parent B represent the B-without-A branch) and then merge in A, I will have to keep maintaining 3 branches when really, once I make the A-specific changes to B-dependent-A the development between B and B-dependent-A should be more or less lock-step. If I branch B-dependent-A, make the A-Specific changes and ignore it while I continue B's development, is there any way to connect B to B-dependent-A so that I don't have to keep manually merging B's changes into B-dependent-A? Or is there no "easy way"?

Question information

Language:
English Edit question
Status:
Expired
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
TimeHorse (timehorse) said :
#1

BTW, because of this problem: https://answers.launchpad.net/bzr/+question/32328 it is taking me forever to create a branch so I'd really appreciate a solution that does not require exponential branching. Thanks!

Revision history for this message
Elliot Murphy (statik) said :
#2

wow, this would be a lot easier on a whiteboard.
I think merging the changes into B-dependent-A should be very easy, if the code is as separate as you say there should be no conflicts.

Revision history for this message
TimeHorse (timehorse) said :
#3

Well, assuming I could create a branch, but the memory footprint is too large for me to run Bazaar's push, I would find the main tedium of having to switch my checkout to B, make changes then switch to B-dependent-A and merge in those changes then switch back to B. Only now I will have some C, D, and E interdependencies, so the problem grows exponentially. I could end up with 20 or more branches, which would be be bad enough if I could actually push my branch but I can't and this is driving me nuts.

I suppose if I could get a reverse-merge to the child working from my B checkout that may be easier. Then I could just push the merge to the known location of B-dependent-A's repository and since I agree there should be few if any conflicts, it should be good enough. I just wish I could solve this branching problem!

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.