Alex Rivera | Logout

How to add CVS directories recursively

Asked 2008-08-07T18:05:28.183
40

I've played with CVS a little bit and am not the most familiar with all of its capabilities, but a huge annoyance for me is trying to add new directories that contain more directories in them. Running "cvs add" only adds the contents of the current directory, and using "cvs import" didn't look like the right thing either since it's still all code I'm producing (this howto claimed import is for 3rd party sources)

Do you guys know any way to recursively add everything in a given directory to the current CVS project (or if SVN or git makes this notably easier)?

cvs
Edit
Report

3 Answers

11

Ah, spaces. This will work with spaces:

find . -type f -print0| xargs -0 cvs add
answered 2008-08-07T20:22:32.807
2

cvs import is not just for 3rd-party sources. In fact, directories are not versioned by CVS, so they are not a subject to branch policies. As long as you import empty directories, it is fine.

answered 2008-08-29T21:28:58.483
0

Mark's solution resolves the spaces issue, but produces this issue:

cvs add: cannot open CVS/Entries for reading: No such file or directory
cvs [add aborted]: no repository

To fix it, the actual command to use is:

find . -type f -exec cvs add {} \;
answered 2008-08-07T21:18:18.933

Your Answer