It's all about the answers!

Ask a question

How do I undo merged files from my changeset


Dan Yau (611) | asked May 22 '12, 10:38 a.m.
retagged Dec 03 '13, 2:36 p.m. by David Lafreniere (4.8k7)
Steps to reproduce:

User 1 modified files A and B and checks in that file to a changeset.
User 2 modifies file A, checks in and delivers their changeset.
User 1 sees the incoming change, accepts and merges.
User 1 now realizes they do not want any of the changes for file A and wants to undo the changes to A and keep B.

When user 1 tries to undo, RTC gives an error saying that it cannot undo those chances as there is a merge and that they have to load a previous version. User 1 tries to load the previous version, it shows up in pending changes as an unresolved change. They can only add that to the merge file.

Is there a way to go back to load file A that user 2 had delivered and not have that change show up in pending changes show a file that needs to be checked in?

Thanks in advance.

Comments
Michael Iles commented Oct 21 '13, 12:25 p.m. | edited Jan 14 '16, 11:10 p.m.

I'm also frustrated by this behaviour. Here's a simple scenario:


1. I make a change to a file and check-in that change (not yet delivered).
2. In the meantime my co-worker notices the same problem and makes the same change.
3. My co-worker checks in and delivers the change.
4. I accept my co-worker's change.

At this point, if I look at the file in my changeset it says "(Merged)" and if I double-click to see the differences it says "There are no differences between the selected inputs".

This all makes sense so far: my co-worker and I both made the same fix, she delivered the fix, and now I have an unnecessary changeset that contains no changes.

So at this point why can't I just undo it, or discard it? The easiest thing to do is to simply retitle my changeset "(No-op)" and deliver it, but that hardly seems like the right thing to do.

2 answers



permanent link
David Olsen (5237) | answered May 22 '12, 12:37 p.m.
JAZZ DEVELOPER

Is there not a different way to change this other then a patch? I ask because this is in code that is checked in but not delivered. I feel there should be a way for me to just "undo" the changes without having to go through the motions of creating patches.


When you said:

>> User 1 now realizes they do not want any of the changes for file A and wants to undo the changes to A and keep B.

I assume that user 1 wants user 2's change to file A, but user 1 doesn't want to make an additional changes to file A.

If user 1's change set has not yet been completed: Create a new empty change set. Move file B from the original change set to the new change set. Remove the associated work item (if any) from the original change set. Discard the original change set. That should leave user 1's workspace with user 1's change to file B in its own change set along with user 2's change to file A.

If user 1's change set has been completed so that the change to file B can't be moved out of it: Make a copy of file B somewhere on the file system outside of the sandbox. Discard the change set. Copy file B back into the sandbox and create a new change set.

--
David Olsen, IBM Rational, Jazz Process Team

permanent link
Ralph Schoon (62.9k33645) | answered May 22 '12, 11:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Here is some material that might help in general:

https://jazz.net/library/article/126
https://jazz.net/library/article/539

In general you should be able to look t the history of the file and be able to see the change. You can get from there to the change explorer. That allows you to see an individual file change and a complete change set. From the file you can create a new patch that reverses the change. For a change set you can do the same. The patch, if merged into the workspace will be the reverse of the merge. You can deliver the change and it is undone. From the history you can also load older file versions. If you do that you will have to check in the new pending change.

Comments
Dan Yau commented May 22 '12, 12:17 p.m. | edited Jan 14 '16, 11:11 p.m.

Thanks for the info!

Is there not a different way to change this other then a patch? I ask because this is in code that is checked in but not delivered. I feel there should be a way for me to just "undo" the changes without having to go through the motions of creating patches.

Here is some material that might help in general:

https://jazz.net/library/article/126
https://jazz.net/library/article/539

In general you should be able to look t the history of the file and be able to see the change. You can get from there to the change explorer. That allows you to see an individual file change and a complete change set. From the file you can create a new patch that reverses the change. For a change set you can do the same. The patch, if merged into the workspace will be the reverse of the merge. You can deliver the change and it is undone. From the history you can also load older file versions. If you do that you will have to check in the new pending change.

Your answer


Register or to post your answer.