How to add directory in CVS
Asked Answered
B

3

5

I have a CVS Server. I want to add a new directory in some already existing directory. How can I do this?

CVS add command adds files in already existing directory. I want to know how to add a sub folder in a CVS folder.

Bake answered 9/5, 2016 at 8:11 Comment(0)
H
10

Create the directory in a local workspace. cvs add <dirname>. That's it.

Note that unlike adding files, which require a subsequent cvs commit, when adding a directory the add happens on the server as soon as you've done the cvs add so make sure you choose the right directory name.

Houseleek answered 9/5, 2016 at 13:23 Comment(2)
for this, i need to check out whole root directory. I don't want to do that. Can you suggest a method to add a directory without checking out whole directory.Bake
You probably only need to check out the parent of the directory you want to add new new directory too. If you want to add a new directory to the root, do a cvs co -l <module>. (-l --ell not the number one-- is don't recurse into subdirs) If you want to add a new directory to foo/bar, do cvs co -l <module>/foo/bar. Then add the directory as described above.Houseleek
C
1

As simple as:

mkdir <dirname>
cvs add <dirname>  
Constellate answered 12/6, 2018 at 18:20 Comment(0)
S
0

How To Add Directories And Subdirectories To A CVS Repository

Here is a quick way to add directories and subdirectories to an existing CVS repository:

cvs add top_level_directory
find top_level_directory -type d -print | xargs cvs add
find top_level_directory -name CVS -prune -o -type f -print | xargs cvs add

The instruction below adds the top-level called top_level_directory directory to the CVS repository:

cvs add top_level_directory

The instruction below finds all subdirectories under top_level_directory and issues a cvs add command to subdirectories that are found:

find <folder_name> -type d -print | xargs cvs add

The instruction below finds all files not including CVS files and issues a cvs add command:

find <folder_name> -name CVS -prune -o -type f -print | xargs cvs add

Thanks to https://paritycheck.wordpress.com/2008/02/29/how-to-add-directories-and-subdirectories-to-a-cvs-repository/

Senseless answered 4/10, 2018 at 19:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.