info-cvs
[Top][All Lists]
Advanced

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

Re: properly using rcs-to-cvs.sh


From: Todd Denniston
Subject: Re: properly using rcs-to-cvs.sh
Date: Wed, 26 Jan 2005 18:59:24 -0500

> Tate Austin wrote:
> 
> Okay, I am struggling to convert an RCS based project to CVS, its supposed
> to be easy, except that this rcs-to-cvs.sh does not cooperate with me.  I
> have the directory with thedirectory tree with its RCS based files in it,
> we'll call it ../rcsrepo .  When I attempt:
> $sh rcs-tocvs ./rcsrepo

you are useing the following?
https://ccvs.cvshome.org/source/browse/ccvs/contrib/rcs-to-cvs.sh?rev=1.4&content-type=text/vnd.viewcvs-markup

... so you have 
TOP/rcsrepo/RCS/
and posibly you have 
TOP/rcsrepo/maybesomething/RCS/

and you have something like
export CVSROOT=/local/cvs/repository/

note that export CVSROOT=/local/cvs/repository/CVSROOT can get really
confusing...use the one I have above. It gets confusing because when you
'cvs init' you get /local/cvs/repository/CVSROOT/CVSROOT and when you have
$CVSROOT pointing in there, it just gets to be too many CVSROOT
representations to keep track of.


Reading the source (looking at the one that came with cvs-1.11.11) 
 "The repository is the directory where the sources should be deposited."
and 
"Traverses the current directory,..."

what I would expect you to need to do is
backup TOP/rcsrepo/ #you do like your sanity ?
cd TOP/rcsrepo/ 
#because that is where the files are.
cvs init #prep cvs for use.
rcs-to-cvs newrepolocation

> I am told to enter some log information.  I leave this part blank.  Then
> it procedes to go through the root directory of the rcs repository
> (../rcsrepo) and outputs:
> 
> RCS/perlfile.pl,v  -->  perlfile.pl
> revision 1.1
> done
> for every file in the directory(every file in the directory has a ,v in
> the RCS subdirectory(../rcsrepo/RCS).

This is unlocking the rcs files, so they can be used in CVS.

> Then I get an error:
> 
> 1stdirectory
> rcs-to-cvs: rcs-to-cvs: not found
> 

1) I do not see stdirectory any where in rcs-to-cvs
2) I am not seeing where it calls itself. do you have the version I pointed
to above?

> I assumed this meant the files were being coped into the cvsrepository,
> (CVSROOT = /local/cvs/repository/CVSROOT)
> but instead it simply creates a directory: /local/cvs/repository/rcsrepo
> and then /local/cvs/repository/rcsrepo/1stdirectory
> with no files in either directory.
> 
> Basically what is happening is that the rcs-to-cvs script seems to bomb
> out when it comes to a directory and issues a
> "rcs-to-cvs: rcs-to-cvs: not found" error.  Which is cryptic to say the
> least, I see no explanation for this behavior in any forum posts or
> mailing list entries.  What is going on?

The rcs-to-cvs has a lot of error checking so it is less prone to error, but
it is difficult for me to follow. I would suggest reading the comments I
made above and see if they help, and if you are still stuck, you could try
the following. But understand this is wholly with out warranty, I have not
really tried it. it has no error checking.
If you have no backup DO NOT USE IT. There is always the possibility that it
could destroy everything.

#first set these to something appropriate, 
#for you I think that is
export WHERECVS=/local/cvs/repository/
#see the description of TOP above.
export WHERERCS=TOP/
#Assumptions 
#you have a backup.
#you hold all the locks in the RCS files.
#you do not have any files you want in CVS that
# have not yet been checked into RCS.
#TOP only has your rcsrepo in it.
#probably others I don't know about, see rcs-to-cvs.sh.
for i in \
`cd $WHERERCS; find . -type d -name RCS|xargs -l dirname`; \
do \
(cd $WHERERCS$i; co -f RCS/*); \
mkdir -p $WHERECVS$i ; \
cp -p $WHERERCS$i/RCS/* $WHERECVS$i/ ; \
done

lets see if it worked 
export CVSROOT=$WHERECVS
cvs init
mkdir -p /tmp/testcheck
cd /tmp/testcheck
cvs checkout rcsrepo
#investigate rcsrepo

-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter




reply via email to

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