WikiStart > Documentation > Using an SVN Repository

Using An SVN Repository in Beaversource

Introduction

Subversion or "SVN" is a tool used to manage changes to text-based files like source code or documents. In terms of programming, SVN provides the means to store not only the current version of a piece of source code, but a record of all changes (and who made those changes) that have occurred to that source code. For this reason, SVN is particularly common on projects with multiple developers since SVN ensures that changes made by one developer are not accidentally removed when another developer makes a change to the Beaversource-hosted source.

In order to access a Subversion repository, you must install a special piece of software called a Subversion client. Subversion clients are available for most any operating system, but we recommend TortoiseSVN for windows users. Tortoise SVN can be downloaded at http://tortoisesvn.net/downloads. TortoiseSVN is implemented as a Windows shell extension, which makes it integrate seamlessly into the Windows Explorer, since it's not integrated into a specific IDE, you can use it with whatever development tools you like.

This SVN Repository map shows the relationship between the source file, which is hosted on Beaversource (HOST), and local copies checked out from the host to be edited, tested and then committed back to the host.


Downloading and Installing TortoiseSVN

TortoiseSVN runs on Windows 2000 (Service Pack 2) and Windows XP or higher.
1. Go to http://tortoisesvn.net/downloads
2. Click .msi file link under Download Application
3. Save the file to a directory on your computer.
4. Double click the downloaded .msi file and install it to a drive on your computer (C: drive is a good choice). If an error occurs in the intallation, this link may help http://tortoisesvn.tigris.org/faq.html#installerror

Using And Accessing An SVN Repository

This tutorial will show the use of an SVN repository during the writing of a short paragraph with sentence-level editing in a plain .txt document.

Preconditions:

  • TortoiseSVN has been installed.
  • The source file is accessible (.txt).
  • You are a member of a project on Beaversource.

Checking A File Into The SVN Repository

Left-click on the image if the resolution is poor.

1. Create a folder that will contain the source file. Name the folder.


2. Right-click on the folder and select SVNCheckout.


3. Enter your project's URL into your browser and then copy and paste the SVN repository URL listed on the page into the requested URL of repository field into the TortoiseSVN checkout menu. Click on the image to the right to enlarge it for a better view. The Checkout Depth refers to four operations: Fully recursive: Checkout the entire tree, including all child folders and sub-folders. Immediate children, including folders: Checkout the specified directory, including all files and child folders, but do not populate the child folders. Only file children: Checkout the specified directory, including all files but do not checkout any child folders. Only this item: Checkout the directory only. Do not populate it with files or child folders.


4. Drag/Paste the source file into the folder.


5. Right-click on the file and select TortoiseSVN > Add.


6. Right-click within your folder SVN Commit.


7. Write a brief note explaining the commit, make sure the file is checked and click OK.


8. Authenticate the commit with your onid username and password. Check Save authentication and click OK. Beaversource provides secure SVN hosting.


9. TortoiseSVN will display the actions of the commit and give you the revision # to reference back to the update.


Understanding Recorded SVN Changes

Beaversource tracks and records changes in an SVN Repository. They can be managed from your project's homepage.

From your project's homepage, you can click History to access a timeline of committed changes to your project's SVN repository.


From here you can see the commits for the last 30 days. Clicking Changeset [10] by kuechlej will provide detailed information about the commit made above.


Changeset [10] by Kuechlej shows the changes made from the SVN commit from the previous tutorial. The color-coded file Jobless.txt was added. This page also shows the comments written when the commit was sent as well as a timestamp and author link.


Analyzing Changes To A Source File Through The SVN Repository

When a change is made to a local copy of a source file, the SVN repository needs to be updated. Commits should be made on a regualar basis to keep the repository file up-to-date. Since these changes are tracked, Beaversource can easily access that information and compare the differences based on changes per commit. SVN cannot show the differences between binary file types: jpeg, .doc, .png, etc.

From your project homepage, click Browse Source.


As you can see from the image, Jobless.txt (checked in to the repository earlier in the tutorial) is listed with size, reference #, age and comments.


After clicking the file, Beaversource presents the information in the text file listed by line.



Follow the the steps in the previous tutorial Checking A File Into The SVN Repository to edit your text file and commit a change to the SVN repository.

Following the project homepage link History, the new modified change can be seen.


When the local copy of the source file is edited and committed to the SVN repository, Beaversource will track the change and give a visual representation of the difference between the old and new version. Changeset [11] shows the modified local copy now committed to the source file in the SVN repository.

Attachments