NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Getting the CVS working


Joined: 13 Dec 2003
Posts: 17
Reply with quote
I'm trying to get the phpED's CVS working on an NT system. The help says:
Quote:
Initialize a CVS repository to enable it to accept file check-ins:

under Windows: cvs -d ":<accessmethod>:c:\cvs\repository" init

under Linux: cvs -d ":<accessmethod>:/var/cvs/repository" init

where <accessmethod> is one of the local pserver:username@remotehost or ext:username@remotehost. The latter requires you to set CVS_RSH environment variable with a file name of ssh executable.

Can you explain that a bit? If the "pserver" accessmethod is "local" what do we put in the "remotehost" part of that? Is "username" the same as a windows login or are we establishing some new account somewhere? Could you point me to an example? Some more words about what environment variables are required would be helpful too.
Thank you.
View user's profileFind all posts by SB3DSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
it depends on access method itself.
For example if you use SSH, you'd run something like the following BAT file:

myinit.bat:
set CVS_RSH=c:\cygwin\bin\ssh.exe
cvs -d :ext:myaccount@myremotehost:/pathtocvsrepository/ init

if you run cvs windows nt service, you'd access it through pserver:

cvs -d :pserver:myaccount@localhost:/pathtocvsrepository/ init

finally, you may create your local repository using local:

cvs -d :local:/pathtocvsrepository/ init
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Dec 2003
Posts: 17
Reply with quote
I've seen differing explanations of accessing the CVS through SSH (there's your manual, the CVS manual, The Putty manual...) and I tried doing that with the Putty software, some of which I've used before. I never quite got that to let me init a repository but this is all on the same machine, so why use SSH? I issued the cvs init command from the command line instead.

This is really time consuming to sort out. The procedures for setting up a Workspace, Project, and CVS are dealt with separately in the manual. When you try and do it you find gaps and end up going to CVS docs from somebody else, or Putty's docs, and they all have different assumptions about what you might be trying to do. There's a lot of room for interpretation, and surely several ways to set this up but it would be a big help to have a very concrete step-by-step example to use as a reference.

(another thing to do in your spare time)
View user's profileFind all posts by SB3DSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
No doubts.
But indeed there in no the only way. Some people have already had an repository set by somebody (e.g. admin) and need to be able to work with it. Some other people do set up from themselves. Anyway, once the repository has been set up, you don't need to return back to this procedure anymore. Your repository may handle as many files and as many projects as you wish (certainly while your disks allow you to).
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Dec 2003
Posts: 17
Reply with quote
After reinstalling openSSH I was able to use phpED's interface to import a project's files into the repository and then remove the project files and now I'm trying to checkout the files from the repository but there seems to be something wrong with the way CVSROOT is set or the project property setting for for repository or the way phpED is forming the cvs command. Here's log entries from a few different attempts:

Quote:

Type Message Time Location
CVS 8:34:45 PM
CVS D:\phpED\CCvs\cvs.exe -z3 -r -d :ext:steve@zeek:/cvs/xmlNpi checkout -d xmlNpi xmlNpi 8:38:22 PM
CVS cvs: not found 8:38:22 PM
CVS cvs.exe [checkout aborted]: end of file from server (consult above messages if any) 8:38:22 PM
CVS 8:38:22 PM
CVS D:\phpED\CCvs\cvs.exe -z3 -r -d :ext:steve@zeek:/cvs checkout -d xmlNpi xmlNpi 8:38:53 PM
CVS 8:38:53 PM
CVS cvs: not found 8:38:53 PM
CVS cvs.exe [checkout aborted]: end of file from server (consult above messages if any) 8:38:53 PM
CVS 8:38:53 PM
CVS D:\phpED\CCvs\cvs.exe -z3 -r -d :ext:steve@zeek:D:/cvs checkout -d xmlNpi xmlNpi 8:39:57 PM
CVS cvs.exe checkout: CVSROOT may only specify a positive, non-zero, integer port (not `D:'). 8:39:57 PM
CVS cvs.exe checkout: Perhaps you entered a relative pathname? 8:39:57 PM
CVS cvs.exe [checkout aborted]: Bad CVSROOT: `:ext:steve@zeek:D:/cvs'. 8:39:57 PM
CVS 8:39:57 PM
CVS D:\phpED\CCvs\cvs.exe -z3 -r -d :ext:steve@zeek:D:\cvs checkout -d xmlNpi xmlNpi 8:40:36 PM
CVS cvs.exe checkout: CVSROOT requires a path spec: 8:40:36 PM
CVS cvs.exe checkout: :(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path 8:40:36 PM
CVS cvs.exe checkout: [:(ext|server):][[user]@]host[:]/path 8:40:36 PM
CVS cvs.exe [checkout aborted]: Bad CVSROOT: `:ext:steve@zeek:D:\cvs'. 8:40:36 PM
CVS 8:40:36 PM


There are two -d options in those cvs commands that can't be right can it? Putting the drive leter in the repository path is interpreted as a bad port number (the colon does that), but leaving it off is no good either. Substituting backslash for slash is no help.

Have any suggestions?

ALSO: Anybody out there using phpED with the SnapshotCM CVS?

Thanks.
View user's profileFind all posts by SB3DSend private messageVisit poster's website


Joined: 13 Dec 2003
Posts: 17
Reply with quote
FYI, if I change the project properties - CVS - method to "local" instead of using SSH, checkout works fine. phpED forms this command:
Quote:
D:\phpED\CCvs\cvs.exe -z3 -r -d /cvs checkout -d xmlNpi xmlNpi

Compare that to the ones logged in previous post.

Question: In the Tools-Settings-CVS tab's CVS Arguments section what determines the text that replaces "@Repository@".

Question: Can the SSH method be used to access via SSH files which are in fact on the same machine? I thought so, and would like to do so as a test. I suppose I could setup a repository on my laptop and try to access that via SSH. Ultimately, I'd like to have PHPed on the laptop access a repository via SSH but I'm not ready to buy a second yet.
View user's profileFind all posts by SB3DSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
CVS has some problems when runs on Windows platform.
Look, if you have a repository on your D: disk, you can't specify your repository as D:\yourpath\ because of ":" which is used as a delimiter and in this case CVS treats letter "D" as a port value.
If you omit D: and set "youpath" only, cvs would accept the argument but would search for repository on the default disk which is the disk where you have Windows installed. Also, you should not type "" in the directory name, use "/" instead.
BTW, if you have openssh installed under your Windows and have sshd daemon running, you probably have CYGWIN. In this case you can easily emulate linux environment and have CVS from CYGWIN running on the server part. I mean that when you run ssh session with SSHD service, the service itself will run CVS from CYGWIN. Don't forget that phped should run its own cvs.exe on the client side. Also, in case of CYGWIN you can access your disk D as /cygdrive/d/ for example. Don't forget about symlinks, they are working too...
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Dec 2003
Posts: 17
Reply with quote
Using cygwin to avoid the colon and other Windows conventions is a real good idea. For now I'm just going to use the local access method but your suggestion ought to work. I'll try it.
View user's profileFind all posts by SB3DSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
if not cygwin, what else ssh do (did) you use ?
putty/plink ? I was unable to run plink with cvs because it adds \r and cvs fails to parse incoming stream. Sad
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Getting the CVS working
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic