Re: "cvs add" using the WinCVS 2.0.2.4 console
Bo Berglund <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.gui.user |
|---|---|
| Organization | cvsnt.org news server |
| Message-ID | <[email protected]> |
On Wed, 29 Nov 2006 04:30:36 -0000, "Chris" <[email protected]> wrote: >If I attempt to "add", say, a new directory, I get the infamous "No >CVSROOT specified! Pelase use the '-d' option". However, I have >clearly setup the CVSROOT parameters outlined in the "Remote >>> >Checkout settings ..." section of the WinCVS interface. The cvs add command is exclusively used *inside* a checked out "sandbox" of files from the server. The CVSROOT referred to in the message is read from the CVS/Root file in this checked out sandbox. But since you have not yet checked out anything you cannot use cvs add... >If I attempt to perform a checkout (although, there's nothing to >checkout) I can clearly see this CVSROOT parameter appear in the >commandline. I don't get that "No CVSROOT specified" error. So why >is it ignored during the "cvs add"? The data you enter in the Remote/Checkout dialog is *only* used for the command it is intended for, namely the checkout. So it does not apply for the other commands. > >Furhtermore, I've read countless entries about how the CVSROOT >environment variable must be set from the unix command prompt. But >is this necessary if it's always included in every command? Forget about the environment variable when you work in WinCvs, it is not used. However, if you go to a command prompt on your XP machine you can do this: c:\>mkdir c:\projects c:\>cd c:\projects c:\projects>set CVSROOT=:sspi:cvsserver:/repo c:\projects>cvs co . This will check out *everything* from the server into c:\projects, which is now converted to a "sandbox". Of course you will have to enter the correct CVSROOT string depending on your server settings... After this you will have the following directories there: c:\projects |--CVS |--CVSROOT (with the cvs server administrative files) |--CVS Both CVS subdirs will contain at least the files: Root Entries Repository This is where cvs keeps the data used for "normal" cvs commands like cvs add. Now you can do the following: c:\projects>mkdir newdir c:\projects>cvs add newdir This adds the newdir dir to CVS and it is now possible to put files into this dir and (from within WinCvs) issue the cvs add command followed by cvs commit. HTH /Bo (Bo Berglund, developer in Sweden)