[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS - import to 1.1
From: |
Pierre Asselin |
Subject: |
Re: CVS - import to 1.1 |
Date: |
12 Mar 2002 20:56:56 -0600 |
"Matthew Persico" <address@hidden> writes:
>Is there a way to cvs import into 1.1, not 1.1.1.1? Without the branch, the
>first lock and commit attempts will work as advertised.
>If I cannot do this, then I have to create an empty project and then write a
>script that will recurse a tree of code, doing cvs adds as appropriate and
>I'd rather not do that.
Doesn't "cvs add" recurse? The procedure I remember goes like this:
mkdir emptydir
cd emptydir
cvs import -mdummy path/to/project/root DUMMY dummy
cd ..
rmdir emptydir
The import just creates an empty directory in the repository. The
import message, vendor branch name and release tag are lost, there
aren't any files to hold them! Add the new directory to your modules
file:
cvs checkout CVSROOT
cd CVSROOT
echo projectname path/to/project/root >> modules
cvs commit
cd ..
cvs release -d CVSROOT
Then,
cvs checkout projectname
cd projectname
: copy your source tree to where you are
: Hmmm... you may need to cvs add the directories first
:
find . -type d -print | xargs cvs add
:
: Darn! I could have sworn that "cvs add" recursed once the
: directories were in, but I can't make it work on my
: (admittedly old) cvs.
: Here's a find incantation to add all the files.
:
find . -type d -name CVS -prune -o -type f -print | xargs cvs add
:
: all the files are added
cvs commit
The files will show up at revision 1.1.
The second "find" works by 1) excluding the CVS directories from the
search, and 2) listing all the files found elsewhere. Works great in a
unixoid environment. If your're stuck in Windows, well that's tough.
So it's work, but I wouldn't call a pair of one-liners a huge
scripting job.
If your files have spaces in their names, use
find ... -print0 | xargs -0 ...
--
Pierre Asselin
Westminster, Colorado
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----