Don’t play with CVS

Posted: May 11, 2013 in Technical Stuffs
Tags: , , ,

I work in a place where we use Concurrent Version System (we still use them :P) . We had our code base with us. We wanted to submit the entire code structure to CVS. It almost had 15 – 20 directories and each containing number of files in it. Instead of checking in the code folder by folder , we tried hitting it in a single shot.

It was an import command that i googled up. I tested in local .. It worked fine.. Then i issued the following command

    cvs import -m "message" code_dir rtag vtag

It got imported. We were happy with it.. But when we tried checking out the code, we found an interesting thing.. Code got checked in the wrong path. Apparently , CVS Import statement doesnt need a commit. It has an auto commit. We ended up in a mess.

Now, we wanted to delete the codes that we have checked in. But, The great CVS system wont allow the code directory to be deleted using a command. Atlast , we ended up with the following command which will erase all the files ( but the folders will remain as such ).

    cvs remove -Rf code_dir
    cvs commit

The directory skeleton remained till the end and we had to convince our admin regarding the trouble that we have created.

Summary : Analyse the negatives parts of the command before issuing it and be careful while using those systems where we don’t have admin rights.

Advertisements

Comments are closed.