CVS on Windows

Since moving away from Sourceforge, we now use an SVN repository instead of CVS.

See How to obtain the source code for SVN information.

What is CVS?

CVS is the abbreviation of Concurrent Versions System. A CVS is a central repository where teams of developers can store the source code of a programming project. If a team of developers is working on the same program, pretty soon a confusing mess of different versions of different source code files will arise (this might also happen to a single programmer). CVS solves this problem by tracking all the changes and thus all the versions of each file. Thus everyone knows where to get the current, “official” version and the CVS software takes care of warning about conflicts and lets you revert to earlier versions.

CVS terms

You start with a checkout. Which is nothing more than a download of the current versions of all files that belong to one project.

The files will be downloaded from what is called the CVS repository. Basically, this is where the CVS server stores all the files along with the version information. Think of it as a database.

If things have changed since your last checkout, you do an update.

If you have the required access rights, you can commit your changes to the repository and make your versions the current, official ones.

A project can consist of several modules. For instance, POPFile currently consists of the modules engine, linux, mac, windows, and the obscure popfile module. Thus, modules are a way to organize the files of one project into different categories that not every developer might need or be interested in.

Using it

If you want to access the POPFile CVS repository hosted by SourceForge.net, you have several (but not many) options.

The SourceForge folks have written up a basic introduction to CVS.

For windows users, they have documented how to install and use WinCVS which is part of the CvsGui project. However, working with that software is not so easy. This is because it assumes a detailed knowledge of CVS and has a very … well … odd … user interface.

A much more user friendly piece of software is TortoiseCVS. It is based on the source code of WinCVS, but the developers were able to give us a really simple to use program. As they call it: “Enjoyable version control” with emphasis on “enjoyable”.

Meanwhile, TortoiseCVS is also covered by the sourceforge.net site docs. This is a much more comprehensive document than the one you are looking at right now; unfortunately, it doesn't provide any screen shots.

Download

Download the latest version of TortoiseCVS from http://www.tortoisecvs.org/download.shtml

Installation

Simply run the file you just donwloaded, you should be able to answer the questions that the setup program might have. The default answer is never wrong.

Checking out the latest POPFile

After you have successfully installed TortoiseCVS, you have to decide where you want to store the CVS version of POPFile. Pick any directory on your system that you like, just don't use the directory where your working version of POPFile is installed. The CVS version may contain bugs and it is available for testing and further development, but not to get the latest stable version. (If you want to checkout files that correspond to a certain, stable POPFile release, see below.)

Once you have found and/or created a directory to store the CVS version, fire up windows explorer and right-click the entry for that folder. From the context menu choose “CVS Checkout…”.

Screenshot: Checking out POPFile

Fill out the fields like shown in the screen shot. Specifically, you need to detail which Protocol to use (Password server / pserver), which server is hosting the repository (cvs.sourceforge.net), how the repository folder is called (/cvsroot/popfile), what your user name is (anonymous), and which module you'd like to checkout (engine).

That's it. After clicking on “OK”, TortoiseCVS will query the server for the files and will download them to your local harddisk. Depending on the speed of your internet connection and the health of the server, you will soon have some 9 MB worth of POPFile sources, manuals, and the test suite.

If you want to update your local files at some later point in time, simply find your folder in windows explorer, right click, and choose “CVS Update”. Since TortoiseCVS will store the settings you have entered for the checkout, you will not have to enter them again.

Unfortunately the CVS servers at SourceForge are not very reliable. So if you get an error message (something like “CVS operation failed”), there are two possible reasons. Either you mistyped one of the parameters or the SourceForge CVS servers don't want to talk to you. So in case of an error, it is suggested to double-check your settings and try again.

Another shortcoming of the sourceforge servers is that anonymous and developer cvs are not in sync. If one of the POPFile developers checks in a change to the code it will take a couple of hours (sometimes even days) before these changes are available by anonymous (read-only) cvs access.

Checking out certain versions of POPFile

If you do not want the latest code stored on the cvs servers, you can also get the file versions that correspond to a certain POPFile release. To do this, fill out the parameters on the “Module” tab as described above and then change to the “Revision” tab. Click on “Update list” to get a list of available POPFile versions and then select one from the drop-down list as shown on the screenshot below.

checking out a certain version

Managing your own changes to the POPFile code

Making patches

If you sometimes make changes to the POPFile code, cvs offers you several options to manage those changes. If you want to send in your changes, simply ask TortoiseCVS to give you a patch. Get the latest version (or a version corresponding to the latest POPFile release) as described above. Edit the files that are now on your harddisk and then right click the file (or directory) and choose “CVS → Make Patch”. CVS will then compare your version of the file with the version on the server and ask you for a filename for the file that will receive the patch. This file can then be submitted as a patch.

Updating POPFile while keeping your changes

Some people tweak POPFile according to their needs. But what if a new version of POPFile is released? Are they supposed to install the latest version and then make all those changes again? Not with CVS! Instead of using the installer or zip file, use CVS to download a certain version as described above. Make your changes and enjoy.

If a new version of POPFile is released, wait until John has tagged the CVS files as belonging to that version and until the SourceForge CVS servers have those files ready. Then, to update to the new POPFile release while keeping your changes, perform the following steps:

  • In Windows Explorer, right-click your POPFile folder to bring up the context menu.
  • Choose “CVS → Update Special”.

explorer context menu with the cvs submenu expanded

  • Check “Get tag/branch/revision” and click on the “Update list” button.
  • Choose the version you want to update to from the drop-down list.

  • Click OK and let TortoiseCVS get the new files and merge your changes.
  • After the update you will get a status window that ought to look something like the below screen shot:

In the last screen shot you can see that Tortoise updated the “stopwords” file, but it also merged my changes into the file. The same is true for “Bayes.pm” which also contained modifications. “popfile.sql”, “Logger.pm” and “Module.pm” also changed, but I had not tweaked them so I simply got and update.

 
tools/cvs.txt · Last modified: 2013/08/27 01:52 by 127.0.0.1

Should you find anything in the documentation that is incomplete, unclear, outdated or just plain wrong, please let us know and leave a note in the Documentation Forum.

Recent changes RSS feed Donate Driven by DokuWiki
The content of this wiki is protected by the GNU Fee Documentation License