info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie question regarding "cvs init"


From: Mark D. Baushke
Subject: Re: newbie question regarding "cvs init"
Date: Sun, 23 Nov 2003 20:13:56 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert P. J. Day <address@hidden> writes:

>   i'm aware from the docs that the standard practice is to create an empty
> new CVS repository, and populate it from there with "cvs import".  

That is one of many methods that people use to populate repositories.

Creating an empty repository and just adding new directories and files
into it are another.

Creating a cvs repository out of an RCS tree is yet another method.

> however, is it feasible (or just plain bad practice) to create a new
> repository over top of an existing directory structure?

Well, it is a good idea if the existing directory structure only
contains RCS ,v files.

>   that is, if i have a directory "dir", under which i have
> several project subdirs, "s1", "s2" and so on, i can apparently
> do something like
> 
>   $ cvs -d dir init
> 
> which will create the CVSROOT directory inside "dir", at which point
> i can checkout any of s1, s2 and so on.

This assumes that the s1, s2 and so on are directories populated with
RCS ,v either obtained from some other cvs repository or from an RCS
repository. You may wish to look at the rcs-to-cvs.sh script in the
contrib directory of the cvs distribution...

Failing that, I suppose you could use the rcs 'ci' command to transform
your existing sources in the s1 s2 and so on into RCS ,v files. However,
you might find it easier to use other tools in that case to populate
a repository some place else with those files.

>  so, technically, it seems doable, but is it just considered bad form
> to drop a repository over an existing directory hierarchy?

It is possible.

>   and, second, from all i've read, it seems i can only use "cvs import" to
> import what's in my current working directory, is that right?  

Using 'cvs import' is one way to take your current directory and put it into
cvs. There are other methods as well.

Another method might go something like this:

     If you are in /some/place/mydir and want everything in 'mydir' to be
     a part of the mydir project, you could do something like this:

     cd /some/place
     cvs -d /path/to/my/repository init
     cvs -d /path/to/my/repository co .
     find mydir -type f > files
     find mydir -prune CVS -o -type d | xargs cvs add
     xargs cvs add < files

> the options list for "import" doesn't appear to accept arguments of
> what to import, and only takes the contents of the current working
> directory, correct?

The 

    cvs import module vendor tag

command will create a 'module' relative to your CVSROOT that has the
contents of all of the directories and files under your current working
directory.

        Enjoy!
        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/wYWE3x41pRYZE/gRAhrJAKCI5f+zOkxYnwtrAl9TRblFPLHOfQCfThwW
uZu3du5ETyUnYQB2wEPlOsc=
=kbrW
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]