epeleg

moving a changeset between branches (feature request/Question)

10 posts in this topic

I had the following scenario:

from /main create child branch /main/child

now I missed the "switch to this branch" that I intended to do,

and fixed a bug while still on /main and checked it in.

So my problem was how to "migrate" this changeset into the /main/child branch.

so at first I though - "o.k., I will merge from /main to /main/child and then remove the change set from /main and thats it"

but it turns out that I could not remove the changeset from /main because of the merge link.

I tried some other thing which all failed for similar reasons.

eventually I just listed the changed files, made a copy of them "outside the system"

deleted the changeset on /main , switched to /main/child and copied the files back into the workspace,

checked in and merged and everything is o.k. now.

Is there a shorter way I could have used ?

like loading a changeset (state of a branch) from a different branch other then the active one ?

or moving the changeset between the branches?

I must say that am not even sure what the meaning of "moving a changeset" should be in the general case:

suppose branch A has state0 -> CS1 ->state1 followed by CS2 leading to state2

and branch B has begins at some state9 -> CS10 -> state10 followed by CS11 leading to state11

If you want to move CS2 to be after CS11

this can be interpreted

either "re-apply the same changes from a different starting point"

or "get to the same state as after CS2 (i.e. create a CS12 that leads to a state12 which is equal to state2) ?!

I believe that most developers think to the changeset as representing the states to which they lead. so the second interpretation is more suitable.

anyway my scenario was simpler because both the place from which I wanted to move the CS from and the place I wanted to move it to are the same "parent" changeset and had nothing that depended on them.

So maybe a solution for this specific scenario can be added (as I guess the pattern of create child but for get to switch to it would not be a rare one...)

Eyal

Share this post


Link to post
Share on other sites

Hello epeleg,

I can't say the number of times I found myself in the same situation! :S hehehehe

This is a well known feature we have to implement!!!!!!

Regards,

Manu

Share this post


Link to post
Share on other sites

Right just now I did a few checkins in a branch that was not the task I was working...

I selected the "Checkin the changes in another branches" and the check asking to switch workspace was checked...

I kept working and after a few checkins I found myself working in the wrong branch... :P

It would be nice to be able to move changesets to other branches...

But I wonder how Plastic will handle things like the directory history and diffs.. :P

Share this post


Link to post
Share on other sites

hehehe funny.

Don't worry about the differences and the history, not a big deal.

Share this post


Link to post
Share on other sites

It could also help a bit if the plugin for VS showed what branch you were on in the Commit Changes view.

Share this post


Link to post
Share on other sites

I am out marketing to drum up some votes for this feature.

 

Wouldn't it be cool (not to mention useful) to be able to look at your branch explorer and drag the changeset from the wrong branch to the correct one?

 

Please vote for this feature.  

 

http://plasticscm.uservoice.com/forums/15467-general/suggestions/3742293-move-changesets-to-different-branch

 

Currently there is shelf if you realize you are about to check in to wrong branch. There is also the ability to move the changes you are about to checkin to a different branch or even check them into a different branch.  But this feature would allow you to move them after the commit.

1 person likes this

Share this post


Link to post
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