Setting up CVS to update FrontierKernel source
CVS is the version control system used to make sure changes to the Frontier Kernel are shared among the developers. I'm just beginning to get an understanding of CVS, but for now, we'll focus on the aspect where you check out changes and updates and update your local copy. At some future time, I'll likely look at what's involved in sending changes back to the main code base.
To use CVS, you'll need a CVS client. As you might expect, there's a command-line interface. Also, as you might expect, it's a lot more pleasant to use a GUI. One such GUI is WinCVS, available from http://www.wincvs.org. You can download the latest copy from http://www.wincvs.org/download.html.
The downloaded ZIP file contains an installer, the creatively named setup.exe. There's one confusing aspect of running the installer. After installing WinCVS, the installer asks if you want to install cvsnt, which contain the actual CVS command executables. I thought at first that this would install CVS as a server or service on my development machine and skipped the install. As a result, nothing worked.
Follow the instructions. Install cvsnt.
Also, when you first run WinCVS, it asks if you want to download the latest Python to get access to the various macros. I skipped this because I'm not yet ready to do anything particularly creative.
Once you've installed WinCVS, you can get docs from http://www.wincvs.org/winhtml/wincvs11.htm. There's one minor gotcha to this: the docs are wrong. The icons, names, and screenshots in the docs don't match the application. Oopsie.
In a very simplistic sense, CVS works like FTP. You've got a remote folder of stuff and a local folder of stuff. The idea is to get the two to talk to each other. Let's first talk about the local folder.
I originally placed my copy of the Frontier Kernel source in the folder H:\My Documents\frontierkernel. I'm still not 100% sure I like it in the My Documents folder, but for now, I can be sure anything I'm doing is backed up, since I've got some scripts that always backup my My Documents directory.
That said, the source actually needs to go into a "Frontier" folder, rather than a "FrontierKernel" folder to work with CVS, since the module we're working on is called "Frontier". I know, it confused me, too.
Once you launch WinCVS, you'll need to tell it where your local directory is. See the icon of the double folders on the far right of the screenshot below? That's the button you'll need to click.

A dialog box will pop-up. Navigate to the My Documents folder. As you can see, the drop-down will also show that directory. You're browse root's been set.
Next, you'll need to checkout a module. You do this by selecting Checkout module from the Remote menu in WinCVS. You'll see a relatively complex dialog box. You'll need to fill in three fields.
In the top field, "Module name and path on the server," simply type "Frontier" (without quotes, of course).
In the field "Local folder to checkout to," you'll want your full path to your local build. Mine is H:\My Documents\.
The real sticky wicket is the field for the CVSROOT. This is where the Frontier Kernel is located in the CVS repository. In this field, which should have a checkmark in it, fill in, exactly:
:pserver:anonymous@cvs.sourceforge.net:/cvsroot/frontierkernel
By doing this, you're downloading the changes as an anonymous user, and there's no real chance of you mucking up the source on the server. Click OK.
The first time you do this, WinCVS will take quite a while and download quite a lot. Subsequent runs (also executed by selecting Checkout Module from the Remote menu) seem to only download changes, which is, really, how it should be.
Some observations:
- CVS appears to fix certain errors introduced by you. For example, I deleted a source file and reran the Checkout Module procedure. The source file was replaced. I also made a change to a source file and did the same Checkout Module procedure. This time, though, the change I made was not overwritten.
- I don't know what this means for making your own local changes. I don't yet know if you'll need to create your own branch or simply keep track of your changes. That's a future homework assignment.
- There may be better Windows GUI CVS programs. This beast seems quite cumbersome, but looks like it's got more options than I'll ever need.
By the way, the Frontier module is only one of the modules in the FrontierKernel CVS repository. There are also modules for working on the various branches and even the .root files.
Andre adds these very useful comments:
Let me recommend the CVS book to anyone who is new to CVS:
http://cvsbook.org/
The first edition is available online in HTML and other formats while the third edition is only available in PDF. I recommend the latter as it contains extended information and practical examples about using CVS in open source projects.
Amazingly, SourceForge also has some very clear docs. The first explains the basics of CVS (and even talks about the different clients you might use beyond the always-pleasant WinCVS):
The second is for those of us who will be checking in CVS changes.
Also, because sending changes back into SourceForge requires SSH secure keys, here's another doc worth reading:
Discuss
|