SVN installation and basic operation (graphic tutorial)

SVN installation and basic operation (graphic tutorial)

1. What is SVN

svn is the abbreviation of Subversion, an open source code version control system. svn is a tool used by multiple people to jointly develop the same project and achieve resource sharing.

What is version control?

Revision control refers to the management of changes to various program codes, configuration files, and documentation files during the software development process. The information of each version can be recorded to facilitate problem tracking. At the same time, version control also supports parallel development, which can effectively improve development efficiency.

Why use SVN?

1. Convenient project backup, saving hard disk space;
2. Record each version to facilitate tracing historical records.
3.Multi-person collaborative development and data sharing;
4. Detailed permission control makes it easier for administrators to control the overall project.

2. Svn server and client acquisition methods

Server: https://www.visualsvn.com/server/download/

Client: https://tortoisesvn.net/downloads.html

After installation, right-click in any folder. If the following appears, it means the installation is successful.

3. SVN workflow and architecture diagram;

3.1 How SVN works:

(SVN workflow diagram)

3.2 SVN architecture diagram:

(svn architecture diagram)

4. Two ways to operate the SVN server

4.1 command-line command line mode;

4.2 GUI-client graphical interface mode;

4.2.1 SVN service connection method:

(1) Internet connection:

Apache server;

svn server;

(2) local local connection:

4.2.2 SVN data storage method:

File mode: FSFS (recommended)

Database method: BerkeleyDB

5. SVN server directory structure, users and permissions;

5.1 Directory structure:

Repositories: store project files managed by SVN, including source code, documents, etc.

Users: create and edit users;

Groups permission group: create and edit user groups;

To open VisualAVN Server: Go to the bin folder in the installation directory of the SVN server and double-click VisualAVN Server.msc to pop up the VisualAVN Server window.

5.2 Create a warehouse:

Standard folder structure:

Branches: If you need to test new technologies or make large-scale modifications, copy the trunk code to the branch and merge it into the trunk after testing.

Tags release: the release version should be put into tags;

trunk: main development directory;

Create a repository named helloSvn:

Create a project named dev:

5.3 Create users: Each developer needs to have his or her own SVN account;

Right-click [Users] - [Create User...], for example, create three users siki, lain, lijiang

5.4 Create groups: configure different permissions for each department for easy management;

5.5 Assign permissions: Assign permissions to users/groups in a repository or directory;

Right-click [Group] - [Create Group...], for example, create two groups admin and javaEE-Team

Similarly: create group javaEE-Team:

At this point, you can assign permissions to the project helloSVN. Right-click [helloSVN] -

6. Common operations of svn:

6.1 checkout

Initial download - When you connect to the SVN server for the first time, you need to download the data of the corresponding warehouse (if there is data in the warehouse);

For example, now let the folder siki connect to the SVN server as follows

Then there are files under the siki folder

6.2 add Newly added:

Add new data to the SVN server;

For example, create a new Item.java file under the trunk folder and add this file to the SVN server:

Now commit to the SVN server:

The following interface is displayed after successful submission:

Now we go to the SVN server and press F5 to refresh. We can see that there is an Item.java file in the trunk directory!

6.3 update Update:

Update data - check whether the data in the SVN server is consistent with the local data. If not, download the changed/added parts without deleting the local data.

For example, if you want to update the data on the SVN server in another libaing folder, you must first right-click in the libjiang folder and click [SVN checkout...]

Now we go to the siki/dev/trunk directory and open Item.java, and we will find that there is no name attribute yet.

At this time, we can right-click [update] to update it, and there will be a name attribute.

6.4 delete

Delete SVN data (need to be combined with the commit command);

For example, to delete the Item.java file in the siki/dev/trunk directory, select [Item.java]-[TortoiseSVN]-[Delete]. It’s not over yet, remember to commit! ! !

6.5 revert rollback:

Roll back the specified version of the code to the local computer. If you want to submit it to the server, you need to use the commit command.

Then you can see that Item.java has been rolled back to the folder. Also, remember to commit! ! !

commit

6.6 Code Conflicts:

When multiple people develop a class at the same time, code conflicts are likely to occur when submitting, which can also be understood as version conflicts;

For example, siki and lijiang modify and update the Item.java file at the same time. Siki adds a price attribute to Item.java, and lijiang adds a num attribute to Item.java. Submit siki first, then when lijiang submits again, it will prompt whether to update. Select OK to update, and then there will be four files in lijiang/dev/trunk.

Siki adds the price attribute to Item.java:

Lijiang adds the num attribute to Item.java:

7. Other operations:

7.1 Check out by version;

Right click [TortoiseSVN] - [show log]

Select Save Address

7.2 Account storage and cancellation;

Right-click in the folder where you need to log out of the account, [TortoiseSVN] - [settings] - [Saved Data] - [Clear all],

7.3 Code comparison tools;

Can highlight the differences between different versions of files

7.4 Download the file with the specified version number;

For example, a new teammate wants to use an old version of a file.

This is the end of this article about SVN installation and basic operations (graphic tutorial). For more relevant SVN installation content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Installation and configuration of VisualSVN Server under Windows (picture and text)
  • Detailed explanation of two methods of installing SVN plug-in in Eclipse
  • How to install and configure SVN standalone server under Linux
  • Eclipse installation SVN online plug-in tutorial
  • SVN installation tutorial server and client
  • Alibaba Cloud Centos7 installation and configuration of SVN
  • SVN server is installed on centos7 system platform
  • How to install SVN server under Linux
  • Detailed CentOS-6.3 installation and configuration method of SVN
  • Detailed installation and configuration of Subversion (SVN) under Ubuntu

<<:  After installing Navicat in MySQL, 2059 appears, Authentication plugin and local link virtual machine docker, remote link server

>>:  SQL Server database error 5123 solution

Recommend

Detailed explanation of CSS elastic box flex-grow, flex-shrink, flex-basis

The functions of the three attributes flex-grow, ...

How to prevent hyperlink redirection using JavaScript (multiple ways of writing)

Through JavaScript, we can prevent hyperlinks fro...

Detailed explanation of docker nginx container startup and mounting to local

First, the structure inside the nginx container: ...

How to recover accidentally deleted messages files in Linux

If there are files that are being used by a proce...

Implementation of multi-environment configuration (.env) of vue project

Table of contents What is multi-environment confi...

Teach you to quickly build a web cluster project based on nginx

Table of contents 1. Project Environment 2. Proje...

A brief analysis of crontab task scheduling in Linux

1. Create a scheduling task instruction crontab -...

MySQL query learning basic query operations

Preface MySQL is the most popular relational data...

A Brief Analysis on the Time Carrying Problem of MySQL

The default time type (datetime and timestamp) in...

Detailed explanation of the use of HTML header tags

HTML consists of two parts: head and body ** The ...

In-depth explanation of the impact of NULL on indexes in MySQL

Preface I have read many blogs and heard many peo...

How to use border-image to implement text bubble border sample code

During the development activity, I encountered a ...

MySQL SQL statement performance tuning simple example

MySQL SQL statement performance tuning simple exa...

Detailed explanation of Svn one-click installation shell script under linxu

#!/bin/bash #Download SVN yum -y install subversi...