I am trying to find out the possibilities of undoing a rebase.
I understand one way would be go to the changeset and delete all versions created by the rebase activity.Is that a good idea ?
Any other ways to do it?
This topic has been locked.
Pinned topic How to undo a rebase ?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
YannFoubert 06000149PY42 Posts
Re: How to undo a rebase ?2007-10-11T08:12:32ZThis is the accepted answer. This is the accepted answer.Hi,
Did you complete the rebase? If not, just "cleartool rebase -cancel".
If you complete the rebase, the undo will be more complex => Basically, a rebase does not create new versions, it modiifes your config spec to point to the baselines choosed for the rebase (in most of the cases the recommended baselines). Then It can generate new versions if you modified before the rebase files that are changed because of the current rebase.
=> Just removing the Change Set of the rebase activity is not enough. You have to do this and to rebase another time to the old fundation baselines that were associated with your stream.
Re: How to undo a rebase ?2007-10-11T08:49:52ZThis is the accepted answer. This is the accepted answer.
- YannFoubert 06000149PY
In mnay cases a rebase produces new versions on your dev stream, such as if you have changed a file and it has also changed on the integration stream since the base version that both are founded from.
Re: How to undo a rebase ?2007-10-11T09:57:54ZThis is the accepted answer. This is the accepted answer.
Re: How to undo a rebase ?2007-10-14T12:12:15ZThis is the accepted answer. This is the accepted answer.See ClearCase wiki:
Re: How to undo a rebase ?2007-10-15T11:26:06ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
Thanks for the wiki.But it still does not solve my problem.
I have this requirement sometimes only when I have completed the rebase activity.So I cannot use rebase -cancel
This wiki shows two ways.
1. Either move all changes to another activity and remove the activity.This won't solve my problem as I want all traces of the rebase to be removed. As if the rebase never happened for all practical purposes.
2. Or to remove the activity after deleting all version changed by the rebase activity.This can be very time consuming as I have tried this once.
Is there any other way ?
Re: How to undo a rebase ?2007-10-15T19:10:48ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
A rebase does 2 things:
- merge the baseline with the changes made on the stream (capturing the merge result in the rebase activity)
- switch to the new baseline (by changing the configspec to the corresponding label)
The first one can be undone by removing the versions of the change set (not by moving them to another activity) and removing the rebase activity. But I am pretty sure that UCM does not allow rebase back to the previous baseline, unless the stream does not contain any changes (i.e. there are no versions (not even a version 0) of the branchtype of the stream).
What can you do?
- avoid rebasing to the wrong baseline, or
- remove the rebase activity (and the versions in its change set), create a new stream from the "old" baseline, deliver the changes to that new stream and lock-obsolete the stream that was rebased incorrectly.
In general, many UCM operations are like history: what has happened cannot be undone.
"If you cut your finger, you cannot uncut it but you can try to fix the damage. You can also try to teach people how not to cut themselves and be more careful."
TOPIC Embedded Systems
Best, the Netherlands
Re: How to undo a rebase ?2007-10-16T05:07:18ZThis is the accepted answer. This is the accepted answer.