Jump to content

How do I merge good changes from a branch, and not unwanted ones?


ChrisD

Recommended Posts

One of our users has been working in a branch, and has a few changes checked in in various changesets that we want to do not want to bring into the main branch when we merge his branch in. In short. I want to merge most of his changes into the main branch, but some of them I do not want. 

I've tried all sorts of things, but Merge wants me to Merge everything. When I create a new changeset in the subject branch I can't seem to easily roll back any changes. 

What is the correct way to do this in Plastic? 
 

Link to comment
Share on other sites

Hello Chris,

as you know Plastic SCM is a changeset-oriented system, not a file-oriented one. That's why the merge is an all-or-nothing operation and it asks you to merge everything.

You may want to use the "cherry pick" operation if the changes you want to merge are isolated inside independent changesets.

If the changes are not stored inside independent changesets then I can give you a workaround that will help you to achieve exactly what you want but it have a handicap, the system will not store any tracking of the operation so if you re-merge from the branch the conflicts will reappear. The process is the following:

1) Merge from the branch, merge everything.

2) Shelve the result of the merge & undo the pending changes you have.

3) Apply the shelve.

4) Checkin what you are interested in, discard what you don't want.

As I said this is going to allow you to choose what you want to submit and what not, but there're will not be any tracking of this "merge", if you re-merge from the branch there're will be conflict you will need to solve again.

Hope it helps!

 

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...