[cvsnt] Re: Using CVS add instead of cvs import

Oliver Giesen ogware at gmx.net
Tue Aug 17 07:40:03 BST 2004


> I'm looking at the Essential CVS book and there is a section on using the
> command
>
> cvs checkout -l -d cvsroot .
>
> as an alternative to using "cvs import" (page 157).

Either that was a typo or you misread. I guess it rather was something like:

cvs -d <CVSROOT> checkout -l .

This could indeed be used as a preparatory step for creating a new root
module. If you execute this in the parent folder of the directory you want
to turn into a root module you could afterwards use the Add command to add
the folder and individual files in it. What the above basically does is
non-recursively checkout the root of your repository (i.e. ".") which
usually contains no files. The net effect is that after having issued this
command you have a hidden CVS directory in the folder you executed it in
that contains the necessary meta information without which the Add command
would not work.

Example session:

c:\Dev>dir /b
MyModule

c:\Dev>cvs -d:sspi:localhost:/testroot checkout -l .
cvs server: Updating .

c:\Dev>dir /b /ah
CVS

c:\Dev>cvs add MyModule
Directory /testroot/MyModule added to the repository

c:\Dev>cd MyModule

c:\Dev\MyModule>cvs add -kb test.gif
cvs server: scheduling file `test.gif' for addition
cvs server: use 'cvs commit' to add this file permanently

c:\Dev\MyModule>cvs commit -m"Initial Import" test.gif
RCS file: /testroot/test/test.gif,v
done
Checking in test.gif;
/testroot/test/test.gif,v  <--  test.gif
initial revision: 1.1
done


Hope this helps.

-- 
Oliver
------
In everybody's best interest, please do not post or CC technical questions
to me in private unless they are specifically about a macro/product of mine
that is NOT already bundled with WinCvs. I will generally forward my replies
to such posts to the CVSGUI list without further notice.
----  ------------------
JID:  ogiesen at jabber.org
ICQ:  18777742     (http://wwp.icq.com/18777742)




More information about the cvsnt mailing list