Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Reversing a work item with two change sets

I have delivered a change that I need to reverse.  The work item has two change sets.  If I show the component history, right-click the work item and Reverse, it allows me to create a patch for change set #2.  I resolved the changes and now have an unresolved change set in my Pending Changes view.  How do I do the same for change set #1.  I'm reluctant to go any further until I know the answer because I really don't want to deliver just a portion of the reversal.  I'm using RTC 5.0.2.

Chris

0 votes


Accepted answer

Permanent link
This is a variation of Arun's answer which was also correct.

If you want to reverse the changes from a work item you would:

1. Use the "Locate Change Sets" feature to first confirm that both change sets attached to the work item are delivered to the stream in question. If for some reason they are not, then there's nothing to do. To do this, right-click the work item, and select "Locate Change Sets", then in the "Search Targets" section at the bottom of the editor drag and drop the stream from another view into this Table section. This will let you know if all the change sets are delivered to the stream. Ex: if only CS1 is delivered and not CS2, then you can only reverse CS2.

2. Assuming both change sets are delivered. We would need to reverse each change set. It is important that we apply the reversal in the opposite order they were delivered. Thus we want to reverse CS2 first, and then CS1 (in some cases the order that the changes get applied in would make a difference). If you can't remember the order, you can always use the History view, and check the "Added On" column to see the dates.

3. Right-click on CS2 in the History view and select "Reverse". This will add a pending patch to the Pending Changes view. Now you can either try to 'auto-resolve' the changes if nothing conflicts, otherwise you will have to manually merge the changes. Whether it auto-resolves or if you manually merged the changes, it will appear as an unresolved pending change in the "Unresolved" folder. (This was part of your question I believe). You can now check-in the file changes into a new change set. To help you can also name this new change set "reversal of CS2". You can then deliver it to the stream.

4. With CS2 merged in (and no longer appearing as pending patch in the Pending Changes view) perform the same steps in #3 for CS1.

Now you have delivered two change sets which reversed CS1 and CS2 to the stream. You can associate these change sets to a 'reversal' Task work item to keep them together.

As a reference, here is the help doc for reversing a change set: https://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.2/com.ibm.team.concert.dotnet.doc/topics/t_reversing_change_sets.html?lang=en


Note: There is another way to reverse changes. If in your case, CS1 and CS2 were the last change sets delivered to the stream, you could simply discard those two change sets from your repository workspace, and invoke the context menu action of "Replace in <target_stream>". This avoids creating/merging any patches. However if there are change sets delivered after CS1 and CS2 to the stream this approach will not work.

The above two suggestions are further explained here:
https://jazz.net/library/article/126#How_do_I_remove_a_change_set_fro
Michael Valenta selected this answer as the correct answer

0 votes


2 other answers

Permanent link
Hi Chris,

I think both changes ( change set #1 and Change set#2 ) associated with work items both has to be reverted ( Reverse ) back if the changes are different.

1) Right Click and Reverse Change Set#1
2) Do same with Reverse Change Set#2

3) Resolve the conflict and merge it back to RWS with latest changes.
4) It will create new change set & verify new changes in latest change set  and associate Work-item before you deliver to Stream.

Please find the link below and test in test stream  before you do it on your production stream.

https://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.2/com.ibm.team.concert.dotnet.doc/topics/t_reversing_change_sets.html?lang=en

Let me know do you have any questions.

Regards,
Arun.

0 votes

Comments

When I displayed the history and expanded the work Item, only the second change set was displayed.  However, since I needed to get this fixed, I ended up reversing the changes manually.

If that is the case I think the changeset has associated with different workitem.


Permanent link
In the component history view, you should be able to just multi-select all of the change sets that you want to reverse, and then apply the reverse operation, which should create a patch that reverses all of those change sets.  

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 1,381
× 1,202

Question asked: May 18 '16, 4:51 p.m.

Question was seen: 5,074 times

Last updated: Aug 05 '16, 4:26 p.m.

Confirmation Cancel Confirm