Tuesday, June 9, 2009

Setting up a New Subversion Repository Server

Abstract
This will walk through the steps of creating and sharing a subversion repository. We're working on a virtual Windows XP instance because its almost always available and gets backed up regularly. I chose VisualSvn Server because it is almost zero configuration and it works nicely on XP, no mess no fuss. I also make use of TortoiseSVN for the task of initializing the repository, checking in and out so install TortoiseSVN right after installing VisualSvn Server. All Language Developers: No fear, VisualSvn Server is still a subversion server, no need to get Visual Studio, works with Java, *** its just a great Windows distribution that is easy to setup.

Background
We have a new development sub-project (finally) for which we can use Subversion to share/store the code base. My main project is called MASS and the new project will load natural gas production measurements (readings) from our new hand-held units via a web service.

1. Log into the Remote XP Server VM

2. Download and Install VisualSvn Server from http://www.visualsvn.com/server/. I found this article http://www.west-wind.com/presentations/subversion/ useful in making the decisions getting started. I chose SSL and Windows Authentication.

3. Configure the Repository
Use the SvnServer Admin tool available under "myComputer" > "Manage" > "Services" and "Applications".

4. Enable Repository Access
Right-click on "Repositories", select "Properties". This brings up a window with one tab labeled Security. Select the "Add" button to add user access. Select the "Locations..." button and select your active directory server as the authentication source, type the userId of a user and select "Check Names..." This should resolve the userId to a windows Domain user. By default this will give all the users entered here read/write access to any of the repositories created on this server. That works for me since our project owns the XP VM.

5. Create a Repository
Right-click on "Repositories" in the hierarchy and select "Create New Repository..." Name it what you like and select the checkbox "Create default structure (trunk, branches and tags)". After you select "OK", the status on the main admin screen should read "Total 1 repositories".

6. Right click on the new repository folder named "trunk" and select "New" and "Folder...". Name it "src" or something you are comfortable with.

7. Switch to your desktop and Create the Project root Folders
cd c:\
mkdir GAS
cd GAS
mkdir MASS
cd MASS

7. Check out the new folder from the repository
Open the file system explorer and navigate to the new project folder (MASS in my example). Right-click on the folder and select "TortoiseSVN", "Repo-browser", paste the URL of your new VisualSVN Server instance admin client, and select the newly created folder from the repository and select "Check out". This will be the basis for you to populate the rest of the repository with your existing code.

No comments:

Post a Comment

Followers