Reversing a file deletion and keeping history
Hello,
(Using RTC 6.0.2).
One of our developers deleted files from a component and the change set was delivered in the stream.
Now we would like these files to come back into the component.
If I do a reverse from my repository workspace, applying the patch will create new files and we'll lose the previous history.
Is there any way to get the files back with their history ?
Thanks for your help,
Regards,
Marie
Accepted answer
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).
Comments
Thanks for your answer Geoffrey.
I should do something wrong with my reverse because it is not working well.
Here is what I do :
1- From my repository workspace, I show the history of the component
2- From the change set, I do the reverse operation
3- It creates the patch in the pending changes view
4- I would like to restore only some files that were deleted, so I select the ones I would like to restore, and select "resolve with proposed"
5- In the Pending Changes, new "unresolved" changes appears and when I check in, it is new files and not the one I had.
What did I do wrong ?
Thanks for your help,
Regards,
Marie
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.
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.
In fact, as it is not possible to select all the other files and remove them from the view, it will be a long job.
When I finish, I'll tell you if it is better.
Thanks!
I made the test (really long to remove all the changes I want to keep) and indeed it worked.
Is there any way to remove the files from the view more easily ?
Thanks for your help !
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.
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.
Perhaps I tried with "auto resolve"...
Whatever, thanks for your help !
The only thing is that I need to select all the files in each directory. It could be long but it is better than removing the ones I don't want.
One other answer
Comments
Thanks for your help Morten, but in this case, I can't do what you propose.
Indeed :
- I don't want to remove the whole change set, only some changes in it
- and there were a lot of change set delivered after this one.
I know that reverse is not traceable, but if the new change set is well named, it is understandable. Especially if I just put back the files that were deleted.
Thank you !