I have a poject that has thousands of files. I made some changes that affected almost half of the files. the changes included editing existing files and adding new files and directories.
I need to revert all these changes and restore the project to how it was. I have created a tag before doing all this but I am not sure how I can restore the whole project from the tag
This is unfortunately the kind of thing that CVS is particularly not good at.
I do not believe that you can lose the history of your big commit (*) but rather you want to commit the reverse of your original changes (a
revert
in some SCM's terminology).I recommend using non-CVS tools to determine what needs to be done and then just do the commits in CVS.
cvs diff
, just regulardiff
orcomm
or whatever you want for this) to get three lists: files you now need to Add and Delete.cvs add
the files that need adding. (Not sure if-kb
is necessary when re-adding a file, probably not, but I'm not certain.)cvs rm
the files that need deleting.cvs commit -R
them all at once.If you have a log file that contain the details of your original big commit, you could also use that to create your list of add/delete/modify commands.
(*) Well, you could probably one-by-one use
cvs admin
to remove the new file versions, but I do not think that is advisable at all.