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

How do I recover a deleted file in Visual Studio?

In Visual Studio, a solution is loaded, a file is changed and checked in e.g. Form1.cs, change is then undone using the 'undo' command, outgoing change set is now empty - how do I recover the deleted contents? In general how do I see the check-in history of the current active change set, showing check-in's undo's etc?

0 votes

Comments

I don't think it's possible to restore the change deleted by "scm undo".



2 answers

Permanent link
Check-in history of a change set works only in the context of history on a file. In your use case, although the change set maintains the check-in history of the file state that was deleted by "scm undo", you are not able to view it since the change set no longer appears in the history of the file. 
If you make any change to the same file and check-in again to the same change set, it will start appearing in the file's history, and then you can also view the content that was deleted earlier in the check-in history of the change set. 

0 votes

Comments

Thanks for the update - so if a file is undone and the changeset completed e.g. delivered, and the user subsequently wants to restore the undo they cannot even though the undone change is in RTC?


Permanent link
In order to see an "undone" change in the history view of a file:
- In the history view:
  - click the View-menu tool button (the downward triangle on the right side of the tool button bar that is at the top of the history view), and select "Preferences" (it really should be "Preferences ..." :-).   Then select the bottom radio button for "Include change sets with matching intermediate states when showing all in repository".
  - click the "Show all in repository" tool button.

Note: This is for changes that were "undone" from a change set.   It will not show you unresolved changes in the sandbox that were undone, because those changes never made it into a change set.
Note: This is in the Eclipse client ... someone needs to verify this is also available in the Visual Studio client.

0 votes

Comments

This preference option is not available in the Visual Studio client. I have opened an enhancement request for the same.

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,027

Question asked: Dec 12 '14, 10:52 a.m.

Question was seen: 14,596 times

Last updated: Mar 04 '15, 12:06 a.m.

Confirmation Cancel Confirm