[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Importing a directory structure
From: |
Mark E. Hamilton |
Subject: |
Re: Importing a directory structure |
Date: |
Thu, 17 Aug 2006 14:09:26 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.7.12) Gecko/20050920 |
Andrew,
Andrew Chalk wrote:
I have just installed CVS. I have created a repository. I want to import the
directory structure of my projects but NOT add any files at this stage. I
will use 'Add' to add them later. What command will achive this?
Interestingly I'm doing a similar thing right now. Here's what I do to
avoid unnecessary copying. Note that I'm assuming here that your working
directory name has the same name you want the top-level directory in
your repository to have.
1. Create your top-level directory in the repository. (Some people call
this a project.) Doing it in an empty directory ensures that no
extraneous files or sub-directories get created
mkdir temp
cd temp
cvs -d<repos> import -m 'New project' project_name a b
2. Check out the (empty) project into your existing working directory.
This shouldn't cause any conflicts, since the repository directory
should be empty.
cd parent_of_project_name ; checkout -d<repos> checkout project_name
3. Create the directory hierarchy from your working directory. I'm
assuming here that working_directory is the same as top_level_dir.
cd project_name
find * -name CVS -prune -o -type d -exec cvs add {} \;
All the files in your working directory should now show up as unknown
('?'). You can 'cvs add' them (or not) when you are ready to commit them.
--
----------------
Mark E. Hamilton
Orion International Technologies, Inc.
Sandia National Laboratory, NM.
505-844-7666