Jump to content

Is it possiblie to undo 'Move changeset to a different branch'?


mdel
 Share

Recommended Posts

Hello,

In the situation where my main branch is A<-B<-C<-D, by running Move changeset to a different branch to the changeset C it will move C and D in another branch. In the case it was a mistake operation, I did not find anyway to revert this operation (and having C and D back to the main branch).

In other word, it is always possible to split a branch in several branch (using Move changeset to a different branch and branch rename) but I did not find a way to merge 2 branches back to one.

Thanks

Link to comment
Share on other sites

Hi,

You can click changeset D and use the option merge from this changeset to and select the main branch, the result in main would be your initial A<-B<-C<-D but going through the new branch (In plastic represents exactly the same as the initial state). This is the easier and quicker solution that maintains the history.

Regards,

Rafael.

Plastic Support Team

Link to comment
Share on other sites

Thank you Rafael.

By merging the moved changesets back to the main branch, it's kind of a "copy" instead of being a move. Because of the merge link it is not possible to delete bad changesets. Is it possible to delete those bad changesets? Maybe there is a way to merge without keeping the merge link? Or removing the merge link afterward?

Regards,

mdel

Link to comment
Share on other sites

Hi,

15 hours ago, mdel said:

it's kind of a "copy" instead of being a move

In plastic the following 2 states are equivalent:

image.png.d226c15c68b291593d4d53d1e1327eab.png

You can see the last green arrow as a blue one in the opposite direction.

15 hours ago, mdel said:

Is it possible to delete those bad changesets?

In general Changesets that are referenced cannot be deleted (source of merge link, with children, labelled or with shelves), In the example A<-B<-C<-D you can delete the D changeset but not the C changeset as it has a child.

In this case you can use Substractive Merge from the Advance merge option. This operation lets you keep A, B and D changes and remove C ones.

15 hours ago, mdel said:

Maybe there is a way to merge without keeping the merge link? Or removing the merge link afterward?

Neither of the two options are possible, having the merge links has no particular consequence over the Changesets.

 

Does this information answer your questions?

 

Regards,

Rafael.

Plastic Support Team

Link to comment
Share on other sites

Hi Rafael,

What I wanted to know was if it was possible to return to the same "branch explorer" visualization. I think your answer is telling that it is not possible: I can go back to the same state of the main branch, but I cannot remove the child branch.

I think the philosophy in Plastic SCM is not to be obsessed about the changeset history. As opposed to git, since plastic can handle much heavier repository, it does not matter if your repository has its history a bit messy.

Thank you, I think you answered my questions.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...