How to restore deleted files/directory in CVS using Eclipse and WinCVS

I faced a issue when somebody accidently deleted our whole website code from CVS. Everyone was worried as to how will this be restored.

Heres the solution:
I used CVS to get out the updates before the current date using the -D option. It gave me all the files as they were before deletion. After this the next step was to add and then commit these files back into CVS. But this is not simple as it sounds. When you take out files from CVS using the -D option CVS places a sticky date tag on every file checked out. Inorder to commit these files back in to CVS you need lto clear the sticky tag using the -A option. But there doesn’t seem to be any easy option available to remove this sticky tag because if you take the update from CVS again you end up deleting the files again. So for that i just searched for the CVS folders inside the files and deleted all the folders. After that I refreshed the workspace inside eclipse and simnply committed in all the files. Quick and easy solution.

The other solution provided by eclipse is to use the Restore From Repository option under Team menu. Altough this is a very powerful option but it is also time consuming and not suited for many files. It searches for all the deleted files in the CVS and allows to select the specifc version that we want restored.

Please let me know if there are any other way to to simplify this task.


One thought on “How to restore deleted files/directory in CVS using Eclipse and WinCVS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s