Reversing a file deletion and keeping history
Hello,
|
Accepted answer
Geoffrey Clemm (30.1k●3●30●35)
| answered May 17 '18, 10:59 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER When you use the "reverse" operation, you will keep all the history ... you will see a delete in the history, followed by the version resulting from the reverse. (I have verified this in 6.0.5, but I don't believe this behavior has changed since 6.0.2). Marie Michelin selected this answer as the correct answer
Comments Thanks for your answer Geoffrey.
Geoffrey Clemm
commented May 26 '18, 9:23 p.m.
| edited May 26 '18, 9:23 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In step 4, instead of selecting the ones you want to restore, try deselecting the changes you don't want to undo, by applying the "remove from view" operation to them. Then when all that is left is the files you want to restore, select the "auto-resolve" option. When I do that, the "create" operation is just added to the existing history.
Marie Michelin
commented May 28 '18, 10:24 a.m.
I'll try that but it will be really long, because it was a "cleaning" change set that removed a lot of filesn and only some of them need to be restored.
Marie Michelin
commented May 28 '18, 11:17 a.m.
I made the test (really long to remove all the changes I want to keep) and indeed it worked.
Geoffrey Clemm
commented May 28 '18, 10:51 p.m.
| edited May 28 '18, 10:52 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Glad to hear that it worked! The fact that the first way you tried it didn't maintain history sounds like a bug to me, so I'd suggest filing a defect against RTC for it.
Marie Michelin
commented Jun 07 '18, 8:42 a.m.
Indeed I don't know exactly what I did that made the history lost, because I tried again with "resolve with proposed" only on the files I wanted to get back, and it worked.
showing 5 of 6
show 1 more comments
|
One other answer
Another way to do this is to do a "rollback".
1. Discard the change-sets from your history (the ones that delete the files)
2. Right-click the component (in pending changes) and select "Replace in <stream>". That will create a baseline and roll the stream to that baseline (the component without the change-sets that deletes the files).
3. After a rollback, make sure all developers accept the incoming "replace" or discard outgoing change-sets that they didn't create themselves.
This is a less "nice" operation than the one described above, but it is actually traceable in the most recent versions of RTC, because each stream now has an "Operations history", and you can actually rollback the rollback itself, if you decide it was not a good idea.
I would in most cases recommend the "reverse" option, because it is still rolling the stream "forward" and is traceable in history. But sometimes a rollback is necessary.
/Morten
Comments
Marie Michelin
commented Jun 07 '18, 4:47 a.m.
Thanks for your help Morten, but in this case, I can't do what you propose.
|
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.