Home  >  Article  >  Backend Development  >  What is SVN

What is SVN

藏色散人
藏色散人Original
2018-12-24 11:24:258434browse

What is SVN

What is SVN (Subversion)?

Before 2010, Apache Subversion (SVN for short) was one of the most popular version control systems. Nowadays, SVN's popularity is declining, but millions of rows are still stored in it. It even continues to be actively maintained, albeit by a small open source community.

The birth of SVN

In the late 1990s, the Concurrent Versions System (or CVS) was widely used for software development in both open source and commercial projects. However, CVS began to receive criticism. It has poor support for third-party tools and absolutely no support for http/https/ssh protocols. It quickly became substandard and a better system was needed.

In 2000, the development of SVN began in earnest. The goal is to create a compatible successor to CVS.

Although SVN development began in 2000, version 1.0 was not released until February 2004. It mimics many features in CVS, but it also introduces new features that are missing from CVS. Users can now execute atomic commands and be able to rename and move versioned files.

SVN became an Apache project in November 2009, when it was accepted into the Apache Incubator. After SVN was introduced to the world, CVS adoption gradually faded away.

Recommended related articles:
1.What is the difference between Git and Svn
2.How to install the Svn tool
Related video recommendations
:
1.SVN video tutorial (Chuanzhi Podcast)

How does Subversion work?

SVN was originally designed as a command line interface. This means you will open a terminal and type text commands.

For Subversion to work, an SVN setup requires two main elements:

1. The server, which has all versions of all source files

2. A local location for the files A copy is on your computer.

The files on your computer are called working files. These are the files that each user edits. Users then commit their changes to the SVN server, also known as the repository.

Every time a user commits a change, SVN manages and records it by creating a new version. As with most version control systems, users typically use the latest version. But you can revert to an earlier version if you need an older version.

What is an SVN server? (What is a Subversion server?)

The SVN server contains all source files and all versions of the files. In the SVN world, servers are called repositories. So, SVN server and SVN repository are the same thing.

The local copy of the file (stored on your computer) is called the working copy.

Is SVN distributed or centralized?

Version control systems can be roughly divided into two categories: Distributed Version Control System (DVCS) and Centralized Version Control System (CVCS) .

SVN is a centralized version control system.

A centralized version control system means that the version history is stored on a central server. When developers want to make changes to certain files, they pull the files from this central repository to their computers. After developers make changes, they send the changed files back to the central repository.

Scalable centralized version control system using Helix Core. Or use Helix4Git for Git-based distributed workflows.

Challenges facing SVN

SVN has a cumbersome branching model

The most common complaint about SVN is its cumbersome branching model. Branches allow you to work on multiple versions of your code at the same time. In SVN, branches are created as directories in the repository. Many developers don't like this directory structure. But the challenges don't stop there.

SVN version 1.6 introduced a concept called tree conflict. Tree conflicts are conflicts caused by changes in the directory structure, and they occur frequently. This increases the complexity of implementing branching strategies in SVN since SVN does not allow you to commit changes when a tree conflict occurs.

SVN requires you to connect to the central repo

In order to commit changes, SVN requires you to connect to the central repository.

There is no point in using SVN without connecting to a central repo. For example, if you're coding offline - during a flight, for example - SVN won't let you commit to the central repository until the connection is restored.

SVN requires you to resolve conflicts manually

Merges are another big problem that developers often complain about with SVN. If you are using history to make one set of changes and commit, then another change (i.e. linear) is made and committed, merging will be easy.

Things get complicated when you have two or more developers working on the same code base and you need to merge. In this case, SVN fails and the developer needs to manually resolve the conflict, which wastes hours of developer time.

Why use SVN

A few years ago, Git and other commercial control systems surpassed SVN. But SVN still has two reasons: cost and inertia.

Cost: SVN is open source, which means it is "free".

Inertia: Once you build a large code base, it can be difficult to switch VCS. SVN has been around since 2004, and organizations that adopt it have millions of lines of code.

The above is the detailed content of What is SVN. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn