LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-24-2004, 04:21 AM   #1
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
What is CVS repository?


What is it and what it does?

Thanks
 
Old 06-24-2004, 04:47 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
CVS is a utility to help manage a group of users that are all editing the same group of files at the same time. A CVS repository is simply the collection of files under CVS management. Typically, CVS is used to manage source code when there are multiple developers on a project. In this case, "repository" typically means the most recent versions of the source code used in the project.
 
Old 07-09-2004, 03:03 AM   #3
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Dark_Helmet
CVS is a utility to help manage a group of users that are all editing the same group of files at the same time. A CVS repository is simply the collection of files under CVS management. Typically, CVS is used to manage source code when there are multiple developers on a project. In this case, "repository" typically means the most recent versions of the source code used in the project.
So, in what way is it useful for end users?
 
Old 07-09-2004, 03:31 AM   #4
corbis_demon
Member
 
Registered: Jun 2004
Location: India
Distribution: CLFS
Posts: 515

Rep: Reputation: 36
End users can mean a group of people accessing a particular set of files or apps that resides in a repository.This could be useful if you a group of users who need to access the same files for editing.You can setup a CVS repository on your account by using the following instructions:

Adding the CVSROOT environment variable

Add the following two lines to your .cshrc (or equivalent) file:
umask 007 (this will replace any existing umask)
setenv CVSROOT $HOME/.cvsroot (.cvsroot is the main CVS repository)
This sets up the CVSROOT environment variable, which is needed by CVS (for example, $HOME = /u2/rmflatt/ ).
Logout and log back in for these changes to take affect
B. Setting up the CVS repository so that other group members and yourself can checkout/in files.
Go to your root directory
type: groups (this determines which groups you are a part of. Remember the group name you wish to use CVS with)
type: umask 007 (all new files will be locked to outsiders but readable and writable by the owner and group of the file)
type: mkdir .cvsroot (this is the CVS repository)
type: chgrp group_name .cvsroot (allows the group 'group_name' access to the .cvsroot repository - substitute group_name with a group name from step 2 [i.e. cs354_31] )
type: chmod 2770 .cvsroot (makes the repository owner and group readable and writable)
type: mkdir .cvsroot/CVSROOT (all the files that CVS needs are stored within this directory)
type: mkdir .cvsroot/project (where project is the name of the project you're working on. Make as many 'project's as desired. A module with the name 'project' will be used [this name goes in the file modules, as described on step 12])
type: cvs init (this populates the .cvsroot/CVSROOT directory with the files that CVS needs. This step assumes the CVSROOT environment variable has been set)
Go to your root directory
type: cvs checkout CVSROOT/modules (this creates a CVSROOT directory tree in your root)
Edit the file (~/CVSROOT/modules) and insert a line that defines the module(s) you're working on (i.e. 'project').
Add the following line at the end of the file (you can add as many modules as needed):
project_name project (where project_name is the name of the module you want defined, and project is the name of the directory containing the files [as created on step 8])
Save ~/CVSROOT/modules
type: cvs commit -m "The message to log with this change" CVSROOT/modules (this commits this changed file into the repository)
type: cvs release -d CVSROOT (this releases (and deletes) the CVSROOT working directory, which you just checked out/in)

To import an existing directory (with files) into the repository:
Go to the directory that contains any directories/files that you want to import into CVS
type: cvs import -m 'Initial checkin' project_name VENDER_TAG RELEASE_TAG (This imports (recursively) any directories/files in the current directory into the project_name repository. VENDER_TAG and RELEASE_TAG can be anything)

Otherwise, files can be added to the repository via:
cvs add file_name
cvs commit

MAKE SURE that the CVS repository is NOT world-readable:
type: chgrp -R group_name .cvsroot
type: chmod -R g+rw,o-rwx .cvsroot
CVS is now set up on your account for the people in group_name to access/modify/update files within .cvsroot/project

To set up other members,try the following:
Each member should add the following two lines to their .cshrc (or equivalent) file:
umask 007 (this will replace any existing umask)
setenv CVSROOT /u/mypartner/.cvsroot (where, in this case, '/u/mypartner/' would be set to what $HOME was above [i.e. '/u2/rmflatt/'] )
Logout and log back in.

To checkout a project:
Go to the directory were you want the project to be in (i.e. ~/cs354_31)
type: cvs checkout project (This checks out the 'project' module, creating a project directory in your current directory, containing all 'project' files).

hope this is helpful.
 
Old 07-09-2004, 01:30 PM   #5
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
This is the benefit: if you have a large number of files in a CVS repository, you can edit the files and "commit" your changes. CVS will take your changes, store the new file inside the repository, and assign a new internal version number to the file. CVS keeps track of all the changes you make to all the files in the repository. This record-keeping allows you, as the user, to step backward and retrieve an older copy of a file. Here are some examples of why you might want to do this:

A programmer writes some new code that lets his program perform some new feature. He commits the changes he makes to CVS, and allows people to retrieve it. After a while, he starts getting emails/complaints that the software crashes all the time or gives bad results. If the source code he had previously worked without problem, then the programmer can be certain there is a problem with the most recent changes. He can then ask CVS to give him the previous version of the source code. In doing so, he can offer people the older, more stable version while he tries to resolve the problem. Second, the older version might help him track down the problem in the new code if he can look at them side-by-side.

Suppose a system administrator is updating a computer system's configuration. Let's say he has taken all of his configuration files, and placed them in a CVS repository. For this update, he needs to change some configuration settings for X, or Apache, or any other piece of software on the machine. So, the changes are made, checked in, and assume there was a mistake; maybe X doesn't load anymore, Apache denies permission for everybody, or nobody but root can login. The administrator can jump back on the machine, fetch the older configuration files, and let the system operate on its old settings while he figures out what's wrong with the configuration.

In a nutshell, CVS provides you with a backup system in a way. It tracks changes you make to files, and allows you to access any previous version. You can even bundle files together to retrieve them using a generic name (like: "source_code_rev1.0" or "basic_config_07_09_2004").

The catch is, the repository is only as good as you let it be. If you make changes, then you have to tell CVS about them. If you don't, then CVS can't update its records. And if that goes for too long, then the last version you have might be horribly out of date.
 
Old 07-09-2004, 11:33 PM   #6
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Thumbs up

Cool, that was easier to understand.

I saw a wine file thats something like wine cvs. If we download this file, whenever theres update from wine programmers, we will be notified about the new changes?
 
Old 07-11-2004, 03:47 AM   #7
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by subaruwrx
Cool, that was easier to understand.

I saw a wine file thats something like wine cvs. If we download this file, whenever theres update from wine programmers, we will be notified about the new changes?
bump
 
Old 07-13-2004, 01:25 PM   #8
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Probably not unless they manually add you to a mailing list. The file you mentioned is probably direct access to the wine CVS repository. You would be downloading the up-to-the-minute version of the source code for wine. It's a gamble. Someone may have just added a feature that will break something, or it may be rock solid. Usually, just downloading stable versions is the way to go, unless you want to get into development.
 
  


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
create a cvs repository with existing files to cvs powah Linux - Software 1 08-19-2005 09:19 AM
Setting up a CVS repository mlalkm Linux - Software 3 01-15-2005 06:00 AM
sourceforge CVS repository Genjix Programming 1 01-09-2005 05:57 PM
Creating CVS repository: cvs [import aborted]: attempt to import the repository enemorales Linux - Software 3 10-15-2004 04:30 PM
Remote CVS Repository shadfiel Linux - General 1 10-18-2002 06:04 AM


All times are GMT -5. The time now is 03:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration