[Cialug] Huge CVS rollback

Jeffrey Ollie jeff at ocjtech.us
Fri Jun 13 15:20:57 CDT 2008


On Fri, Jun 13, 2008 at 2:58 PM, Tony Bibbs <tony at tonybibbs.com> wrote:
> Had a PM do a silly commit that effectively deleted a bunch of files.  I've managed to check out a copy using the -D option but my question is how do you actually get it back in?  Is this going to be a painful exercise of adding each file/directory and committing or is there a better, quicker way?

I personally would convert the repo to a Git repo and then use Git to
revert the bad patch and send it back to CVS.

cvs -d <cvsroot> co -d <module>.cvs <module>
mkdir <module>.git
cd <module>.git
git cvsimport -v -d <cvsroot> <module>
git log
# take note of bad commit id
git revert <bad commit id>
git log
# take note of commit id of reverted patch
git cvsexportcommit -w ../<module>.cvs <reverted commit id>
cd ../<module>.cvs
cvs diff -u
cvs ci -m "Revert commit"

Jeff


More information about the Cialug mailing list