SVN Resources

See SVN website and SVN book

SVN Tutorial (Windows-based with TortoiseSVN)

Create a code base

To be completed by only one member of each team. Complete the following steps:

  1. Open windows explorer.
  2. Create a folder called "project" where you will store project files.
  3. Create a project directory structure
  4. Create a file called developerInfo.txt in the docs directory.
  5. Insert the names of all the developers on your team in the file developerInfo.txt, one name per line.
  6. Save the file.

Create repository from existing code base

To be completed by only one member of each team. Complete the following steps:

  1. Open windows explorer.
  2. Right-click on the "project" folder you created above. Select "Tortoise SVN->Import" (see image below).
  3. Enter the URL of your repository (something like "http://wiki.csc.calpoly.edu/307S07osos/svn").
  4. Enter a message in the textbox (something like "Initial Import"). Click on "OK".
  5. When prompted, enter your username and password.
  6. If everything worked, you now have placed this code in your repository.

SVN Checkout

To be completed by remaining members of each team. Complete the following steps:

  1. Open windows explorer.
  2. Create a folder where you will store project files.
  3. Right-click on the folder you created and select "SVN Checkout" (see image below).
  4. Enter the URL of your repository (something like "http://wiki.csc.calpoly.edu/307S07osos/svn"). Click on "OK".
  5. When prompted, enter your username and password.
  6. If everything worked, you now have a copy of the repository in your directory.

Make a change and commit

To be completed by one member of each team. Complete the following steps:

  1. Navigate to the file docs/developerInfo.txt.
  2. Open this file with an editor.
  3. Add your email address to the end of the line with your name.
  4. Save the file.
  5. Right-click on the folder containing your project.
  6. Select "SVN Commit".

Update your copy to get changes

To be completed by all members of each team. Complete the following steps:

  1. Open windows explorer.
  2. Right-click on the "project" folder you created above. Select "SVN Update".
  3. Enter the URL of your repository (something like "http://wiki.csc.calpoly.edu/307S07osos/svn").
  4. When prompted, enter your username and password.
  5. If everything worked, you now have the latest copy of the repository in your directory.
  6. Check the docs/developerInfo.txt file to see if you have the new email address.

View changes before committing

To be completed by all members of each team. Complete the following steps:

  1. Navigate to the file docs/developerInfo.txt.
  2. Open this file with an editor.
  3. Add your email address to the end of the line with your name.
  4. Save the file.
  5. Right-click on the project folder and select "TortoiseSVN->check for modifications".
  6. Right-click on the file docs/developerInfo.txt and select "TortoiseSVN->diff".
  7. Don't commit your changes, go on to "Update and merge"

Update and merge

To be completed by all members of each team. Complete the following steps:

  1. All team members should have added their email address to the file docs/developerInfo.txt, but not committed the changes to the repository.
  2. Have one team member commit their change.
  3. Attempt to commit and see error message.
  4. Right-click on docs/developerInfo.txt and select "SVN Update".
  5. See if the new changes were added to the file.
  6. Commit your changes.

Resolve conflicts

To be completed by all members of each team. Complete the following steps:

  1. Have all team members change an the same line of a file to something different.
  2. Have one person commit their change. Have everyone else try to commit their different but conflicting change. See the errors.
  3. Right-click on docs/developerInfo.txt and select "SVN Update".
  4. Open docs/developerInfo.txt to see what svn does to help you resolve the conflicts. Also see the versioned files in the folder.
  5. Right-click on the docs/developerInfo.txt and select "TortoiseSVN->edit conflicts".
  6. Experiment with the resolve tool. Right-click on the text you want to use, and select the option to "use this text".
  7. Select the pull-down menu to mark the conflicts as resolved.
  8. Commit new resolved file.

Delete a file from the repository

To be completed by one member of each team. Complete the following steps:

  1. Right-click on the docs/developerInfo.txt file and select "TortoiseSVN->delete".
  2. Commit the change.
  3. Check to see if the file is gone from the repository.

Switch to an old version

To be completed by all members of each team. Complete the following steps:

  1. How would you do this?

Update to the latest version

To be completed by all members of each team. Complete the following steps:

  1. How would you do this?

Restore the file you deleted earlier

To be completed by all members of each team. Complete the following steps:

  1. How would you do this?

Delete change from repository

To be completed by all members of each team. Complete the following steps:

  1. How would you do this?