?
Solved

Adding a directory to CVS

Posted on 2002-05-09
5
Medium Priority
?
606 Views
Last Modified: 2010-04-21
I am trying to add a new directory to my project in CVS.  I checked out all of my files and would like to add a directory in the root directory of my project.  

root_dir = place where I did a co of all my files

I want to make root_dir/new_dir and put stuff in there.  

The issue is when I try and do from the root_dir

cvs add new_dir

I get the error

cvs [add aborted]: there is no version here; do 'cvs checkout' first

But I don't have a CVS directory in my root_dir and I have already done a full checkout.  So how can I add this directory?  Thanks!!

 
0
Comment
Question by:alpine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6999584
cvs' root directory only constist of projects (or modules), you cannot "add" directories there, only "import" projects,
use:

   cd root_dir && cvs import new_dir

(use options for your pupose)
0
 

Author Comment

by:alpine
ID: 6999720
Let me explain,

In my root_dir I don't have a CVS directory.  There are about 5 directories in root_dir, each having a CVS directory in the 5 directories.  I want to make a sixth directory with files that I would like to check in.  Now when I say "I need to add a directory", should I really be saying "I need to add a module?"

Also, there is an alias in the modules file in the CVSROOT that lists the alias for grabbing all 5 of the directories.  Now can I just add new_dir to the alias file?  Or would I use cvs import?  Every attempt at the syntax for my cvs import fails.  

Ideally I just want to be able to do a checkout using just the alias and pull down all six directories.  Thanks for your help.  Any ideas?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6999773
depending on your setup (CVSROOT, permissions, etc.), only the cvs-admin user can import the module in CVSROOT
0
 
LVL 2

Accepted Solution

by:
JYoungman earned 300 total points
ID: 7150112
Example of how to do it:

mkdir /home/you/scratch
cd /home/you/scratch
cvs co myproject
cd myproject
mkdir mynewdirectory
cvs add mynewdirectory
cd ..
cvs release -d myproject

Everyone else just does "cvs update -d" to refresh their working copy.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question