Jump to content

moving a changeset between branches (feature request/Question)


Recommended Posts

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...)


Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

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.  




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.

Link to comment
Share on other sites


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

  • Create New...