This is an old revision of the document!
Table of Contents
Subversion
*THIS TUTORIAL IS UNDER CONSTRUCTION*
This tutorial is not about using a version control system, or about using Subversion, but about how to get started with Subversion on SDF
There are graphical tools such as TortoiseSVN, but we will start with Subversion's command-line tool (this is SDF we're talking about, right?) which is svn
, and is installed on the cluster
Creating A Repository
To create your own svn repository (place to store projects under source control) run the commands to setup a repository named “my-cool-project” in your homedir under $HOME/.svn_repos
.
$ mkdir .svn_repos $ svnadmin create .svn_repos/my-cool-project
You can then checkout your new repository into a working directory.
Make a directory for the working copies of your projects, say:
mkdir ~/coding-projects
In this local setup where we are using file://
URLS, Subversion requires that you use an absolute path to the repository. To learn the full path to your home directory type:
cd; pwd
In the rest of this document you will need to replace '/path/to/homedir/' by the output of the previous command, or alternately, the $HOME
parameter
Then we can (locally) check out our project like so:
svn co file://localhost$HOME/.svn_repos/my-cool-project
Importing A Directory
If you want to add an existing folder to your repository:
Let's add our website into our repository:
cd html cvs -d /path/to/homedir/cvs import -m "initial import" html user start
In this command
- '-d /path/to/homedir/cvs' specify the path to our repository. Alternatively you can add:
export CVSROOT='/path/to/homedir/cvs' to your ~/.profile file. You must use an absolute path.
- 'import' is our cvs command
- '-m “initial import” is a message that will appear in the log.
- 'html' is the name of our new module
- 'user' is a vendor tag, you can use your username or SDF or whatever
- 'start' is a release tag.
You can modify the message, the module name and the tags to your liking, just keep in mind that in the rest of this tutorial we will use 'html' for the module name.
4 Checking It Out
cd mkdir tmp cd tmp cvs -d /path/to/homedir/cvs co html
This should be enough to convince ourselves that the directory is now under version control.
5 Accessing It Remotely
We can access our repository from the outside using ssh, to do this we need to set the environment variable CVS_RSH so that cvs will use ssh, using for instance: