Using Subversion with VS Code

A VS Code extension can be used to submit assignments to your Subversion repository. This extension uses a Subversion client. To use the extension, you need to install both the Subversion client and the extension proper.

Installing a Subversion Client

Windows

  1. Download the installer for TortoiseSVN
  2. Run the installer. Be sure to install the command line client tools on the Custom Setup page.

MacOS

  1. install homebrew via https://brew.sh
  2. install svn with the command brew install svn

Installing the Extension

  1. Navigate to the extensions marketplace
  2. Search for "subversion"
  3. Install the extension authored by Chris Johnston

Using the Extension

Checking out a Project Directory

  1. Press ctrl+shift+p, type "SVN: Checkout", and press enter

  2. When prompted for a repository URL, paste the url specified on the lab page for your class. Be sure to include your Flashline username.
  3. Select a location to save the respository
  4. Enter a name for the folder the repository is to be stored in and press enter
  5. When prompted for a "repository username", enter your Flashline username
  6. When prompted for a "repository password", enter your Flashline password
  7. The repository will be cloned to the folder specified and you will be given the option to open it.



    You can open the folder to begin working on labs. At any point in time, opening this folder in VS Code will allow you to use the Subversion extension.

Committing files to Subversion

After checking out a respository, you are ready to work on assignments. A good practice is to isolate each assignment into it's own folder within the repository. A folder can be created for each lab containing all of the source code for that assignment. Once the assignment is complete, this folder and its contents can be added to the repository.

To add files and folders to a Subversion repository:

  1. Click the source control button along the right side of the window
  2. Click the plus button next to any unversioned files and folders that you would like to add to the repository
  3. Type a commit message in the text box above the "Changes" section
  4. Click the checkmark to commit the changes (by committing you are uploading the files to your repository)
  5. Check that your files have been uploaded successfully by visiting the same URL used to checkout the repository.

Updating the Local Copy

If you work on projects on multiple computers it is likely that at some point your local copy will become out of date with the most recent commit to Subversion. To update your local copy, you can click the "Update Revision" button in the status bar at the bottom left of the screen.