Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
97 views
in Technique[技术] by (71.8m points)

How to add CVS directories recursively

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)?

question from:https://stackoverflow.com/questions/5071/how-to-add-cvs-directories-recursively

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I found this worked pretty effectively:

First, add all the directories, but not any named "CVS":

find . -type d ! -name CVS -exec cvs add '{}' ;

Then add all the files, excluding anything in a CVS directory:

find . ( -type d -name CVS -prune ) -o ( -type f -exec cvs add '{}' ; )

Now, if anyone has a cure for the embarrassment of using CVS in this day and age...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...