Learn the latest and most common functions of SVN in detail on the entire network

Table of contents

1. What is SVN?

2. How SVN works

3. Main operations of SVN

4. The meaning of SVN status icon


VisualSVN Server latest download address: https://www.visualsvn.com/files/VisualSVN-Server-5.3.0-x64.msi

TortoiseSVN latest download address:

Download TortoiseSVN-1.14.5.29465-x64-svn-1.14.2.msi (TortoiseSVN)

1. What is SVN?

SVN is the abbreviation of Subversion and is a version control system (Version Control System, VCS). A version control system is a software tool used to manage file and code versions. It allows multiple people to collaborate on projects, track the modification history of files, and provides functions such as rollback, branching, and merging.

Subversion (SVN) is a centralized version control system developed by CollabNet. It provides a central repository (Repository) to store the project's files and history, and allows multiple developers to interact with the repository through client software. Developers can checkout a copy of the project from the warehouse to the local workspace (Working Copy), modify, add, delete, etc. locally, and then commit these changes to the central warehouse.

SVN has the following features and advantages:

  1. Version control: SVN can track the modification history of files, record the change information of each version, and support viewing, comparing and restoring historical versions.

  2. Collaborative development: Multiple developers can use SVN to collaboratively develop the same project at the same time and keep files synchronized through submission and update operations.

  3. Branching and merging: SVN supports creating branches to develop different features or versions in parallel, and then merging the branches back to the mainline.

  4. Conflict resolution: When multiple developers modify the same file at the same time, SVN can help resolve conflicts and merge modifications from different versions.

  5. Security: SVN provides authentication and permission control mechanisms that can limit user access to warehouses and files.

  6. Simple and easy to use: SVN’s command line interface and graphical client tools provide a simple and intuitive operation interface, making it easy for developers to use and learn.

It should be noted that SVN is a centralized version control system. Compared with distributed version control systems (such as Git), its operations and data are concentrated in a central warehouse, and developers need to interact with the central warehouse. The distributed version control system distributes a complete copy of the project to each developer, allowing developers to perform version control operations locally, making it more flexible and independent.

2. How SVN works

3. Main operations of SVN

  • SVN Checkout
  • SVN commit (upload SVN Commit)
  • SVN Update (Download SVN Update)
  • Relocation: When the SVN address changes, relocation is required
  • Show log: View history

1. SVN Checkout:

SVN checkout is used when establishing a connection to the SVN server for the first time.

When checking out, you need to provide:

  • SVN address
  • user name and password

Note: Before checking out, create a new folder first, because many files and folders will be checked out during checkout. The purpose of creating a new folder is to put all the checked out files and folders together.

Checkout steps are as follows:

1) Create an empty folder (project name), such as: D:\huileketang

2) Enter the newly created folder

3) Right-click and select "SVN Checkout..."

4) In the small window that opens,

a) Repository URL: Enter the svn url address of the project,

b) Check out to directory: Enter the folder directory created in step 1 (D:\huileketang)

5) Click "OK" to check out.

Note: If it is the first time to check out, the following 2 pictures will pop up. Enter the user name and password, as shown below:

After entering the user name and password in the above picture, and clicking the "OK" button, the data will start to be downloaded from the SVN server to the local machine.

As shown below:

Then click the "OK" button in the picture above. At this point, the first file download from the SVN server is completed.

6)  View the local file results, as shown below:

2. SVN submission (upload SVN Commit):

SVN submission means submitting or uploading modifications, additions, and deletions of files or folders on your computer to the SVN server.

Whenever a local file is modified or deleted, that is, whenever the local file is inconsistent with the server file, you can upload the local file to the server through the "Submit" function, so that others can update (download or synchronize) to your submission. document.

For example: the files in the "modified status" in the red part of the picture below

  • If you want to commit all modified files or folders in the current folder, then you need to right-click in the blank space of the folder and select "SVN Submit (C)..."
  • If you only want to submit the latest content of a certain file or folder, then you only need to right-click that file or folder and select "SVN Submit (C)..."

3. SVN update (download SVN Update):

Update/download the modified content in the SVN server to your personal computer to keep it consistent with the SVN server

Whenever you want to see the latest content of a certain file or files, you need to download the latest content of the file from SVN first. In this case, you need to use the "SVN Update (U)..." function.

  • If you want to download the latest content of the entire folder, then you need to right-click in an empty space of the folder and select "SVN Update (U)..."
  • If you only want to download the latest content of a certain file or folder, then you only need to right-click that file or folder and select "SVN Update (U)..."

The specific steps for SVN update are as follows:

1) Enter the folder where you want to download the update (mine is D:\huileketang)

2) Right-click in the blank space of the folder "D:\huileketang", as shown below, click "SVN Update (U)..."

3) Click "SVN Update (U)..." and the following page will pop up:

4. Reposition:

When the SVN address changes, relocation is required.

Method: Right-click the blank space of the folder corresponding to SVN and select "TortoiseSVN" -> "Relocate (C)..."

5. Display log:

Viewing history records mainly involves viewing the submission history of files or folders, such as who, when, and which files or folders were submitted.

Method: Right-click the blank space of the folder corresponding to SVN and select "TortoiseSVN" -> "Show Log (L)"

4. The meaning of SVN status icon

Common SVN icons include the following, as shown below:

1. "General": A green circle with a white check mark mainly means that the files or folders on your computer are consistent with the corresponding files on the SVN server, and no modifications have been made on your computer.

2. "Modify": A red circle with a white exclamation mark. When you start editing a file, the file's status will change to modified status, and the icon will also change to a red circle with a white exclamation mark. Through this status change, you can know which files you have modified and which files need to be submitted.

3. "Conflict": A yellow triangle with a black exclamation mark means that there is a conflict. Generally, this kind of conflict is likely to occur when editing a file at the same time.

4. "Read-only": A gray circle with a white check mark. This is the mark that will appear after setting the read-only attribute. Read-only cannot be canceled until you obtain the file lock. Read-only files use this overload icon to indicate that you must obtain a lock before editing.

5. "Deleted": A red cross indicates that the corresponding file or folder is scheduled to be deleted, or that the file is missing.

6. "Add": The blue plus sign indicates that the file or folder has been planned to be added to version control. Usually newly created files or folders will have this logo.

7. "Ignore": A gray circle with a white horizontal line indicates that it is no longer under version control.

8. "No version control": A blue circle with a white question mark indicates that there is no version control yet, but it has not been ignored.

9. "Lock": A yellow lock means that the file is locked, and the lock must be released before other people's modifications can be submitted.

Guess you like

Origin blog.csdn.net/weixin_53678904/article/details/133106125