|
OPENCORES: CVS howto
Introduction
CVS is a version control system, which allows you to keep old versions of files (usually source code), keep a log of who, when, and why changes occurred. Unlike the simpler systems, CVS does not just operate on one file at a time or one directory at a time, but operates on hierarchical collections of directories consisting of version controlled files. CVS helps to manage releases and to control the concurrent editing of source files among multiple authors. CVS allows triggers to enable/log/control various operations and works well over a wide area network. CVS keeps a single copy of the master sources. This copy is called the source `repository'', it contains all the information to permit extracting previous software releases at any time based on either a symbolic revision tag, or a date in the past. For more information about CVS see an excellent CVS reference manual (PDF, 550KB). The OpenCores server runs a CVS service (cvs.opencores.org) that are publicly accessible for the source code of all our cores. This document shortly describes how to get read/write access to the source code.
CVS access via WWW browser
You can access the source code via your favourite WWW browser. This allows you to access the contents of individual files in the repository and also to look at the revision history and commit logs of individual files. You can also ask for a diff listing between any two versions on the repository. Use the URL: http://www.opencores.org/cvsweb.shtml/ To download the latest version of an entire cvs module the easiest method to perform this is using the CVSGet download.
CVS access via standard CVS client application
You can also access the source code via a normal cvs client. This gives you much more control over you can do with the repository and allows you to checkout whole source trees and keep them uptodate via normal cvs commands. This is the preferred method of access if you are a developer and not just a casual browser. To gain access via anonymous cvs use the following steps. For this example it is assumed that you want a copy of the Ethernet source code. 1. Install a recent copy of cvs. All you really need is a copy of the cvs client binary. You can download the latest cvs source code from CVS open source project. CVS is free software under the GNU GPL. 2. Set CVSROOT in your environment to
:pserver:anonymous@cvs.opencores.org:/cvsroot/anonymous 3. Run the command
cvs login When it asks you for a password just hit enter 4. To check out Ethernet sources, run the command
cvs -z9 co ethernet This will create a directory called ethernet containing the latest Ethernet source code. For the other source code repositories on this system just substitute the correct package name. 5. Whenever you want to merge in the latest code changes use the following command from within the ethernet directory:
cvs -z9 update -d -P 6. To check out a particular branch (in our example branch_name) use the following command
cvs -z9 co -rbranch_name ethernet
CVS access via MacCVS/WinCVS
Very user friendly CVS client is available for MS Windows and for Macs. You can download the latest version from http://www.wincvs.org. Use STABLE version. We have used WinCvs 2.0.9.1 for this example. In the example below, we are useing the "cvstest" repository, please use this repository for testing and learning. Then switch to the official repository "cvsroot"
Below is a screenshot of WinCVS setup (to remember the user & password)
Below is a screenshot of WinCVS for read-only access (setup for the test-repository "cvstest")
 read-only access |
Below is a screenshot of WinCVS for write access. Replace oc_user with your username
 write access |
Read/Write CVS access
Read access Everyone can use our anonymous account 'cvs' (w/o quotes) to grab files from CVS. Just press enter when you are asked for password. Write access We have write access to the CVS repository available for all our developers. First you need an OpenCores account. See FAQ on how to get account. Then you have to start new project. After you project is approved you should be able to commit your project files. Each developer has it's own CVSROOT:
:pserver:<username>@cvs.opencores.org:/cvsroot/<username> Putting files into CVS first time: Details how to commit files using WinCVS - cvs login
- cvs import <project_name>
- all the files are now on OpenCores CVS
- cvs checkout <project_name>
- now you have <project_name> folder on your local drive
- copy files you want to put on CVS in that folder
- cvs add
- cvs commit
Please use test repository '/cvstest/<username>' until you are sure how to use CVS.
CVS Links
It is possible to create unix style links inside of CVS repository. This is useful when different projects use the same part of source, or when one project is a part of another project. Developers may create links with tool called CVS Links.
Bugs
If you have any problems with this system please email administration@o...
|