Subsections

2. Downloading PLearn

After having been hosted for several years on SourceForge (under CVS), as of 2005/06/21 PLearn development has been moved to BerliOS (http://developer.berlios.de) that offered the benefits of a faster hosting with the more modern Subversion (SVN) version control system. The latest version is always available through SVN access.

2.1 Anonymous SVN checkout

If you just want to hack PLearn locally, you can do an anonymous checkout (no need for a BerliOS account) with

svn checkout svn://svn.berlios.de/plearn/trunk PLearn

2.2 Developer SVN access

If you are going to be a serious contributor to PLearn, you should create a BerliOS account for yourself, and ask to be added to the developer list. This will give you read/write access to the PLearn repository.

Make sure you first move any older version of PLearn out of the way, for ex. by renaming it PLearn.old You can then check-out a fresh copy of PLearn with the following instruction:

svn checkout svn+ssh://USERNAME@svn.berlios.de/svnroot/repos/plearn/trunk PLearn
where you replace "USERNAME" by your Berlios username. You will be asked for your Berlios password twice.

If you don't want to be bothered with svn asking passwords, clisk on Account Maintenance on the left panel of your BerliOS personal page, and on Edit keys on the bottom of the Maintenance page. You can copy your ssh public key there. (Note: your ssh public key is normally found in your /.ssh/*.pub If it's not there, you can do a ssh-keygen). As for many changes within BerliOS, it may take a while before this is propagated and taken into account.

We also suggest that you edit your ~/.subversion/config and look for the line containing global-ignores: uncomment it and add OBJS in the list of ignored patterns, to avoid being annoyed with these directories when doing a svn status command. You'll also have to uncomment the line [miscellany] three lines above.

2.3 SVN basics

From within your local PLearn directory:

Unlike CVS, most subversion commands are recursive by default. Check the help for a particular command before using it if you are unsure.

For more details, there is a excellent free subversion book online available at: http://svnbook.red-bean.com/en/1.1/index.html

If you don't have the time to at least peruse the whole book, I would still strongly recommend that you at least read appendix A: Subversion for CVS users: http://svnbook.red-bean.com/en/1.1/apa.html

2.4 Overview of the directory structure

Your checked out PLearn has the following high level directory structure:

The plearn* directories contain C++ source code (.h and .cc), and as your root PLearn directory is in the -I directive of the compilation commands, this allows to include relevant files by directives such as, for ex:

#include<plearn/base/Object.h>
#include<plearn/io/PStream.h>
#include<plearn_learners/generic/PLearner.h>