It's all about the answers!

Ask a question

How to move back to older code version in scm in Eclipse client?


Krzysztof Kaźmierczyk (7.4k374103) | asked Mar 11 '14, 7:17 a.m.
edited Mar 11 '14, 7:18 a.m. by Piotr Aniola (3.7k11738)
Hi all,

We are developing a small project in RTC. One of my colleagues has delivered recently the code (several changesets) which we do not want to release in current version.
Therefore I would like to move back to the point in the time when the code was ready to release, make some tests and create an snapshot of that code.

Anyway I have couple of problems e.g. how to move back to that version in the code and how to create snapshot of that version.

What is the best recommendation here?

Comments
1
Ralph Schoon commented Mar 11 '14, 7:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Krzysztof,

I am not sure this is the best way of doing it, however it is one valid way. I leave this as comment so that others answer as well.

If you know the change sets e.g. find them with a work item or using the search. You can create a patch for the change set and apply that to revert the changes. Once you have done that, you can do the snapshot and tests.



Krzysztof Kaźmierczyk commented Mar 11 '14, 9:21 a.m.

Thanks Ralph,
I am trying to perform the steps you have recommended but I have troubles with creating reverse change set. Here is the flow I am trying to do:
1. Open a stream history and locate new change sets which I believe are the ones I need to revert and click on Locate Change sets
2. In search target I am selecting my workspace and double click Search view appears
3. Selecting all change sets included right click to open in change summary
4. Click on that and select create new patch
5. Then clicking on project in Eclipse client then Team -> apply patch
But there is no option to reverse the patch. How can I reverse it?


Ralph Schoon commented Mar 11 '14, 9:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Sorry, I was wrong.

In the Change Explorer on the change set, you can select "Reverse" which also creates a patch, however, this is a reverse patch. It should be available in the pending changes view, where you would run a merge.

I would consider playing with this on a test instance, in case you have one available.


Alex Fitzpatrick commented Mar 11 '14, 2:31 p.m.
JAZZ DEVELOPER

I would consider playing with this on a test instance, in case you have one available.


Or a test stream, which is much easier to create and discard. 

Accepted answer


permanent link
Evan Hughes (2.4k1318) | answered Mar 11 '14, 2:59 p.m.
JAZZ DEVELOPER
See How do I remove a change set from a stream? in the Source Control FAQ. 
Krzysztof Kaźmierczyk selected this answer as the correct answer

Comments
1
sam detweiler commented Mar 11 '14, 3:01 p.m.

hm.. I was just going to post my same question from last week (with my answer)



1
Krzysztof Kaźmierczyk commented Mar 12 '14, 4:32 a.m.

Evan answer is the best but all answers are good :) Thanks all for answering.
Ralph - should we close this thread?


Geoffrey Clemm commented Mar 13 '14, 4:58 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

In general, I see no reason to "close" a thread.   Someone might have a follow-up comment relevant for a future release.   Marking an answer as "accepted" makes it clear to the community that the poster is satisfied with the answer.

One other answer



permanent link
Arne Bister (2.6k12832) | answered Mar 11 '14, 10:48 a.m.
JAZZ DEVELOPER
edited Mar 11 '14, 12:07 p.m. by Geoffrey Clemm (30.1k33035)
Krzysztof,
depending on the last time you did a snapshot before the "offending" change sets were delivered, this alternative approach might get you around patches:

Create a workspace from the latest snapshot. Flow that workspace to the stream containing the "offending" change sets. Accept only the change sets you want to the workspace, except the ones that should not be in there. Now make a snapshot in workspace and promote to stream, rebase to that snapshot.
Would that work?

Depending on how the change sets are intertwined you might need 4.0.6 and beyond for Merge Gap handling.

- Arne

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.