Toflidium.com Articles

Setting up a CVS repository on your webserver.

By Toby Allen
Monday, January 26, 2004

Recently I put up a call for someone who might know of a place on the web that would provide me with cvs hosting.  I was looking for something like what Sourceforge.net provide their users, but my code is commercial so I couldnt put it up on sourceforge.  A friend got onto me and said he could sort it out for me. 

You see in my ignorance, I though you needed a 'cvs server' on the internet server, and thus thought I needed something special.  In fact as anyone out there who has done it knows all you need is some webspace, and a username to access it.  Once I had figured this out, there was no problem. I have any number of bits of webspace I can use, and so as a public service, I'm going to go over what you need to do to set up your own cvs repository on a simple bit of webspace you may have on the web.  I'm not bothering too much with the security aspects of this, so just keep that in mind.

The first thing to do is to download a cvs client such as

WinCVS or TortoiseCVS

Once installed, these allow you to connect to a cvs repository and upload and download information. 

Firstly I will go over the basics, this was my stumbling block.  How to create a 'module' or repository (aside: One of the things I've found quite frustrating with cvs is the fact that a lot of the words to me are very confusing.  Module and repository, Update and Commit, it took me a while to figure out what each thing did).

I cant remember how to do it in wincvs (I just used this for sourceforge stuff) so I'll concentrate on Tortoise CVS. 

  1. Select the folder you wish to use as the cvsroot on your webserver.  This can be above your public_html directory if you wish and have correct access rights.  Create this folder.
  2. Select the folder you wish to set up as a new module (project) on your server.
  3. Right click and select CVS->Create new module.
  4. -Select the protocol (this is dependant on the servers, so try a few if the first one doesnt work)

- In server, type the domain name you wish to connect to.

- In repository folder, type the full path to the folder you wish to use on your server.

- In username type the username you use to logon. 

- Module automatically defaults to the folder you right clicked on, but you can change this if you wish.

Click OK and it will ask you for your password, and then create the folder/module on the server for you.

You can now right click on any file and click add to add a file to the repository on your webserver.  Please note though you need to right click and select 'Commit' for the file to actually be transfered.

This is the basics of setting up a CVS repository on your machine.  For more informaton on using CVS, please see the tortoisecvs help.

 

What is CVS

CVS or Concurrent Versioning System, is a rather old system for keeping track of changes to files.  Its primarily used for source code, but can technically be used to keep track of changes to any file.  Its major benefit over other forms, is the fact that a file is never 'locked' meaning two or more people can edit a file at the same time.  When the changes are merged with the master copy in the cvs repository you can add a note saying what changes you made.

About Us | Site Map | Contact Us | ©2003 Toby Allen - Toflidium Software