SVN Study Notes

SVN Study Notes

What is SVN?

Subversion (SVN) is an open-source version control system that manages data changes over time. Data is stored in a central repository, which acts much like an ordinary file server but retains a history of every change made to the files. This allows users to restore files to previous versions or browse through historical changes. SVN offers several features including simplicity, cross-platform support, and version rollback capabilities. In contrast, Git is a distributed version control system that operates differently. While SVN stores data in a central repository, Git works with multiple copies of the data, making it more flexible but also more complex to manage. Additionally, SVN has a global version numbering system, whereas Git does not.

Download and Install

Server Software
  1. Download: Visit VisualSVN to download the appropriate software.
  2. Installation: Follow the default installation process until completion.
  3. Location: The VisualSVN Server files will be located in the bin directory within the installation directory.
  4. Create Repository: Create a new empty repository to start using SVN.
Client Software
  1. Download: Obtain TortoiseSVN from the official site at TortoiseSVN.
  2. Installation: During installation, ensure that the command-line tools are enabled.
  3. Configuration: After installation, you should see TortoiseSVN options in the right-click menu.
  4. Language: If needed, download and install the Simplified Chinese language pack.

How to Use SVN

Checkout
  1. Directory Selection: Right-click the desired directory and select “SVN Checkout.”
  2. Checkout Options: The “Checkout Depth” option provides four choices—check out everything, check out subdirectories and files, check out a single file, or check out an empty project. By default, the entire directory is checked out.
  3. Access Code Base: Enter the URL http://zt.net.henu.edu.cn/svn/StarKit/ into your browser to access the codebase. Upon entering your username and password, you can browse the repository contents.
Update
  1. Update Project: Right-click the project and select “SVN Update.”
Commit
  1. Submit Changes: Right-click the project and select “SVN Commit” to submit your changes.
Revert
  1. Local Modifications: If you’ve made changes that you no longer want, use the “Revert” function. Right-click the project directory, select “TortoiseSVN,” then “Revert.”
Log
  1. Check Log: To view commit logs, right-click the project directory and select “TortoiseSVN,” then “Show Log.”
Resolve Conflicts
  1. Conflict Resolution: When conflicts arise due to simultaneous edits by different users, right-click the project directory, select “TortoiseSVN,” then “Resolve Conflict.” Mark the resolved areas and re-commit.

This guide covers the basics of using SVN, from installation to common operations. If you’re interested in exploring more about cloud services, consider joining Tencent Cloud’s media-sharing plan for exclusive benefits.

Published on: March 15, 2018


Note: This guide is intended to help users understand and utilize SVN effectively.