LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2003, 03:21 AM   #1
heero82
Member
 
Registered: May 2003
Posts: 45

Rep: Reputation: 15
remote import of cvs


hello, everyone, i am new in cvs,

before i have testing the cvs with some simple instruction.
that works.
but now i faced one problem: the problem is how to remote import the file from a client to a server.

all my enviroment is using the redhat 9.0, the cvs version is built in the redhat 9

the server ip is 192.168.1.254, the client ip is 192.168.1.25.
now i my pc is the client on, so i can use the pserver to login to the 192.168.1.254 using the following command.

cvs -d server:root@192.168.1.254:/home/cvsroot login.
the /home/cvsroot is already inside the server.

that is correct. Now i use client pc, i want to import one of the directory file to server pc. the command i use can not be done, cause "the CVSROOT could not be found". so i have to initial again(cvs -d /home/cvsroot init).

after i use the "cvs -d /home/cvsroot init" command. the CVSROOT was created in my client pc(i don't want do that). what i want to import is under my client pc.

am i confused you, sorry. What i want to do is remote import from client pc to server.

can i do this ?what is the instruction. if can, please give the completed source and instruction.

thanks for your help and concerning.
your concern would be apperciated.

best regards
heero82
 
Old 07-12-2003, 03:27 AM   #2
Zoombie
Member
 
Registered: Jul 2003
Distribution: Debian Testing
Posts: 180

Rep: Reputation: 30
You don't want to run cvs init on the client side. You just need to specify your CVSROOT either with an environment variable or with -d, and then add files. Are you trying to add a project, or add files to a project? If you're adding a project, you may want to consider defining a module. If you're just adding files, just run cvs add filename and then commit.

Links you may find helpful:
Starting a project with CVS
Adding files and directories
 
Old 07-13-2003, 12:16 AM   #3
heero82
Member
 
Registered: May 2003
Posts: 45

Original Poster
Rep: Reputation: 15
thanks

so you mean not to init the cvs in my client pc?

i want to specify the CVSROOT? but where can i specify the CVSROOT? i think the CVSROOT is not in my client pc, is in the server pc? can it be done?

i have not check out the link you ask me to, but i have seen for a look, that looks great and helpful to me.
thanks for ZOOMBIE
thanks for your help.

best regards
heero82
 
Old 07-13-2003, 12:27 AM   #4
Zoombie
Member
 
Registered: Jul 2003
Distribution: Debian Testing
Posts: 180

Rep: Reputation: 30
Judging from your earlier post, it seems as if you're running the CVS pserver. That means that you can specify the CVSROOT for your client computer like this:
:pserver:username@hostname:cvsroot
Just like you did from your server computer.
Under Linux, you can set your CVSROOT variable with:
Code:
export CVSROOT=...
Then you can just do your cvs login and cvs checkout.
 
Old 07-13-2003, 03:39 AM   #5
heero82
Member
 
Registered: May 2003
Posts: 45

Original Poster
Rep: Reputation: 15
as you said,

i have done this to login to my cvs server,
cvs -d serverroot@192.168.1.254:/home/cvsroot login

the 192.168.1.254 is my server ip, and the server cvsroot is in the /home/cvsroot.
it can be done which means i login success to my server.

after i do in my client pc, i run this command.

cvs import -m "cvs frist testin" cvs-test root start
it said no cvsroot in my client pc.

so i want to specify the server's cvsroot?
how is the command?

i have tpyed the command in my client pc
cvs -d /home/cvsroot init
export cvsroot=/home/cvsroot
but this is in my client one, it does not appear in my server.
and all the file import to my client server.


how should i do ??
thanks for zoombie...
regards heero82
 
Old 07-13-2003, 12:36 PM   #6
Zoombie
Member
 
Registered: Jul 2003
Distribution: Debian Testing
Posts: 180

Rep: Reputation: 30
You would do:
Code:
export CVSROOT=:pserver:root@192.168.1.254:/home/cvsroot
cvs login
cvs import -m "cvs first testin" cvs-test root start
You must always specify the CVSROOT using the environment variable (export CVSROOT=...) or using the -d option (between cvs and your command), until you obtain a working copy of a project or files. After that, CVS will remember the CVSROOT.
 
Old 07-13-2003, 08:43 PM   #7
heero82
Member
 
Registered: May 2003
Posts: 45

Original Poster
Rep: Reputation: 15
i have done this. but the CVSROOT is always under in my client pc ?
how ??

cvs -d server:root@192.168.1.254:/home/cvsroot login

this cvsroot of this command is in the /home/cvsroot, but this /home/cvsroot is in my client pc , how do i get into the server /home/cvsroot.

the command you teach is doing in client pc or server pc?

Last edited by heero82; 07-13-2003 at 08:52 PM.
 
Old 07-13-2003, 10:05 PM   #8
Zoombie
Member
 
Registered: Jul 2003
Distribution: Debian Testing
Posts: 180

Rep: Reputation: 30
The last part of the CVSROOT (/home/cvs) should be the path on the server. If the repository on your server is /home/cvs, the last part should be /home/cvs. Basically, the client CVSROOT is the server CVSROOT with the server info (:pserver:user@address:) before it.
 
Old 07-14-2003, 11:38 AM   #9
heero82
Member
 
Registered: May 2003
Posts: 45

Original Poster
Rep: Reputation: 15
so now the command is

cvs -d /home/cvsroot init
inital cvs

cvs -d server:root@192.168.1.254:/home/cvsroot login
for login

export CVSROOT=/home/cvsroot
export cvsroot

after then i can check in and check out or imoprt from server to client or from client to server?

isn't

thanks for zoombie
 
Old 07-14-2003, 01:32 PM   #10
Zoombie
Member
 
Registered: Jul 2003
Distribution: Debian Testing
Posts: 180

Rep: Reputation: 30
The cvs init command only needs to be run once, and should only be run on the server. That commands creates a repository. Your repository already exists on the server, right?

So you'd want (from the client):
Code:
export CVSROOT=:pserver:root@192.168.1.254:/home/cvsroot
cvs login
Now you can check scripts in and out.

Also, I'm not an expert, but I believe logging in remotely as root is bad in most situations. You may want to create a user to log in as for CVS.
 
Old 07-15-2003, 04:49 AM   #11
heero82
Member
 
Registered: May 2003
Posts: 45

Original Poster
Rep: Reputation: 15
it can't work? how? why ?

that is because after i do the export /home/cvsroot the command in my client pc, the client pc cvs would recognize the cvsroot in my client pc.

even i have removed the client pc's cvsroot, it will say that i no specified cvsroot.

how do i do ?

what i want to ask is that the cvsroot can not specify to the server's cvsroot ... now the cvsroot i do is in my client pc

can i import the file to the server using the command:
cvs import -m "test 1" hello.java root start

is there any commandto sepcify the cvsroot of the server?

thanks for zoombie

Last edited by heero82; 07-15-2003 at 05:13 AM.
 
Old 07-15-2003, 12:21 PM   #12
Zoombie
Member
 
Registered: Jul 2003
Distribution: Debian Testing
Posts: 180

Rep: Reputation: 30
From your client, you should specify the CVSROOT with this commaand:
Code:
export CVSROOT=:pserver:root@192.168.1.254:/home/cvsroot
 
Old 07-15-2003, 08:18 PM   #13
heero82
Member
 
Registered: May 2003
Posts: 45

Original Poster
Rep: Reputation: 15
that works.
thanks for zoombie.

now i will check out the project that i do can work or not...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating CVS repository: cvs [import aborted]: attempt to import the repository enemorales Linux - Software 3 10-15-2004 04:30 PM
cvs import question blackzone Programming 1 08-05-2004 07:39 AM
cvs import: permission denied for dskny Linux - Software 0 07-12-2004 04:28 PM
CVS remote setup for RedHat 8.0 arobinson74 Linux - Newbie 2 02-01-2004 02:15 PM
Remote CVS Repository shadfiel Linux - General 1 10-18-2002 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration