Jump to content

Plastic SCM branch management


Recommended Posts


I have a question about PlasticCM regarding branching. Lets say I have a mainline of code that is always maintained with all of the latest changes and features. At some point I create two branches called 1.0 and 2.0. Then I make many changes that go into mainline only (not 1.0 or 2.0). Then I have a bug fix that I want to go into mainline and 2.0 but not 1.0, and I don't want the other changes that have been made in mainline since 2.0 was created. Would I need to check out files from both mainline and 2.0 and modify them independently or does PlasticCM have a way of merging just this one specific set of changes?

Here's my attempt at drawing the situation. So in the diagram below, I want the bugfix to go into branch 2.0, but I don't want the other changes in mainline to go into 2.0.

|change |change |change |bugfix

mainline ---------------------------------------------------->

| | |

| | V

| branch2.0 |------------------------------->


branch 1.0 |------------------->

I guess the alternate scenario would be if I made a change in branch 2.0, can I merge that change back into mainline?


Link to comment
Share on other sites


So, if I understood correctly you want to make a bugfix (let's call it bf001). Ok, there are several ways to solve it, but I'll take the easier one:

- Make a branch for the bugfix (branch per task pattern) which will be child of branch2.0: br:/main/branch2.0/bufix

- Work on it.

- Integrate your branch both on branch2.0 and mainline (you need two merges here).

Another option would be using the "cherry picking" merge capability, which would help you choosing exactly which changeset you want to integrate on the other branch.

I'd recommend you using the bugfix branch option if possible, which is clearer and easier.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...