CVS Checkout into existing directory that does not already contain CVS meta files

21 views Asked by At

I have a script that creates a directory, writes some logfiles into it, and optionally tries to checkout some CVS files into it. However, this is failing on a fresh run where the CVS meta folders and files (CVS/Entries etc) do not already exist.

In the snippet below I show that I can delete folder module then check out file module.prj under module module, which re-creates that folder and subfolder CVS with several CVS meta files, and checks out module.prj. An immediate re-run of the checkout works because all that stuff already exists.

However, if I delete the CVS subfolder (to simulate the scenario where the folder module was created by another script already), the next attempt to checkout module.prj fails because those files are missing. Similar behaviour if delete module.prj itself.

Is there some additional switch or option I can add to tell CVS to add the requisite meta files if they're not already there?

Thanks.

$ rm -vrf module
removed directory 'module'

$ cvs.exe checkout module/module.prj
U module/module.prj

$ cvs.exe checkout module/module.prj

$ rm -vrf module/CVS
removed 'module/CVS/Entries'
removed 'module/CVS/Entries.Static'
removed 'module/CVS/Repository'
removed 'module/CVS/Root'
removed directory 'module/CVS'

$ cvs.exe checkout module/module.prj
cvs.exe checkout: cannot open CVS/Entries for reading: No such file or directory
cvs.exe [checkout aborted]: no repository

$ rm -v ./module/module.prj
removed './module/module.prj'

$ cvs.exe checkout module/module.prj
cvs.exe checkout: in directory module:
cvs.exe checkout: cannot open CVS/Entries for reading: No such file or directory
cvs.exe [checkout aborted]: cannot open CVS/Entries.Static: No such file or directory
0

There are 0 answers