Subversion Repository Setup


These instructions are for the team Configuration Manager.  

References

RapidSVN tutorial.

Prerequisites

This activity uses the RapidSVN Subversion client for Linux.  Be sure it is installed on your workstation.
Your instructor must have issued your team a Trac project. 
The team manager must have given you permission to access the site. Login to the site with your Cal Poly username/password. Click the Browse Source tab. The report should say "No files found."

Import folder structure (Configuration Manager)

In this activity you will setup the structure of the subversion repository for your team Trac project.  You should only have to perform this procedure once.  In the directions below, TRACNAME should be replaced by the name of your Trac project that was issued to you by the instructor.

Create the folder structure on your workstation

  1. Create a new folder on your hard drive named MyImport.
  2. Within the MyImport folder, create a subdirectory named trunk.
  3. Within the trunk folder, create a text file named README.TXT.  Put a single line in this file giving your team name and project name and optionally a remark such as "This is the source code repository for our project."

Import the folder into your Trac repository with RapidSVN.

  1. Start RapidSVN.
  2. Choose Repository > Import.
  3. In the Import dialog,
    Specify URL: https://calpoly.repositoryhosting.com/svn/calpoly_TRACNAME
    Specify Path: /path/to/folder/MyImport
    Enter Log Message: "Creating trunk folder"
  4. Click OK.
  5. Wait for a moment while the files are uploaded to the repository. You should observe Subversion messages similar to this:
    Execute: Import
    Added: /path/to/folder/MyImport/trunk
    Added: /path/to/folder/MyImport/trunk/README.TXT
    Updating...
    Ready
  6. When completed, use a Web Browser and login to your Trac home page.  Click "Browse Source" and the trunk folder should appear.

Create a NetBeans project  (Configuration Manager)

Now you will create an empty NetBeans project and import it into the repository.

Prerequisites

Your team needs to have chosen a name for the software you plan to build such as "Canasta" or "SuperBackgammon".
Complete the procedure above.

Create a new NetBeans project.

  1. Start NetBeans (7.3.1).
  2. Select File > New Project.
  3. The Choose Project dialog appears.  Under Categories select Java.  Under Projects select  Java Application. Click Next.
  4. The New Java Application dialog appears.
  5. In the Project Name field enter the name your team has chosen for the software you are building.  In the examples below we will use OurGame.
    Location: /path/to/folder/MyImport/trunk
    Click Finish.
    After a few moments a new project should appear in the Project panel.
  6. Click on the project node.  Click on Source Packages > ourgame.
  7. Open the file OurGame.java.  The skeleton source code appears in the editor window.
  8. Add a line to the main method:
    System.out.println("Title will appear here");
  9. Press F6 to run the project.  Be sure it builds and runs.  Verify the results in the Output window.
  10. Right click on the project node and select Versioning > Import into Subversion repository.
    Repository URL: https://calpoly.repositoryhosting.com/svn/calpoly_TRACNAME/trunk
    Enter User/Password.
    Click Next. (Observe "connecting to Subversion Repository" progress bar).
    Repository folder: trunk/OurGame
    Enter a log message, e.g., "Creating NetBeans project".  Click Next.
    Observe importing...
  11. Files to Import list appears.
    Click Finish.
    Observe committing...
  12. Note that NetBeans automatically sets Subversion to ignore the build folder.  We don't want people to download all the .class files whenever they Update.
  13. When completed, use a Web Browser and login to your Trac home page.  Click "Browse Source" and open the trunk folder to observe the NetBeans folders.


Add Folders to Repository (Configuration Manager)

In the root folder of the repository, create two additional folders; one named branches and one named tags. You can accomplish this using RapidSVN. In the Modify menu, choose Make Directory.