Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the principle and function of SVN

2025-01-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "what is the principle and function of SVN". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

SVN: a free and open source version control system that stores files in a central version library, which is very much like an ordinary file server, except that it can record every modification of files and directories, so that you can restore the data to the previous version and view the details of the data changes.

Copy-modify-merge scenario (default mode):

In this model, each customer reads the project configuration library and creates a private working copy, a local mapping of files and directories in the version library. Users work in parallel, modify their working copies, and eventually, private replicas are merged into the final version, a system that usually assists the merge operation, but ultimately depends on manual determination of right or wrong.

Lock-modify-unlock scheme:

In such a model, a file of the configuration library is only allowed to be modified by one person in a period of time, and this pattern is not suitable for software development.

Some concepts of SVNd:

Repository (source code base), the place where the source code is stored uniformly

Checkout (extract), when you don't have the source code on hand, you need a copy from repository checkout

Commit, when you have modified the code, you need to commit to repository

Update (update), when you have checkout a copy of the source code, update you can synchronize with the source code on repository, and your code will have the latest changes.

Daily development process: update gets the latest code-- makes its own changes and debugs successfully-- commit

There are two modes of operation of SVN server: stand-alone server and apache, both of which have their own advantages and disadvantages. Users can choose by themselves.

There are also two ways to store version data in SVN, BDB, a transaction-safe table type, and FSFS, a storage system that does not need a database, because BDB may lock the data when the server is interrupted, so FSFS is more secure.

SVN server: VisualSVN

SVN client tool: TortoiseSVN

Download address: https://tortoisesvn.net/downloads.zh.html

Download:

1) create or enter the directory (such as E disk), and right-click → SVN Checkout

2) URL of repository can fill in the warehouse path.

3) at Revision, "HEAD revision" refers to the latest version, or you can specify Revision as any version.

Update:

1) when someone else modifies the contents of this directory on the server after moving out of the corresponding directory from the configuration library, the process of getting the changes to the local directory again is called update. Updates can be for one file, several selected files, or the entire file directory.

Select the file to be updated, and right-select the "SVN Update" item, as follows:

2) after clicking "SVN Update", a pop-up window will show the progress of the update, as follows:

If any of the files in the above box are bright red, there is a conflict between the content from the configuration library and your local modification.

2) then fill in the log (log message) about this update, which is required, otherwise commit will fail, as follows:

3) when the prompt box shown in the following figure appears, it indicates that the modification has been successfully submitted, and the current SVN version number is increased by 1.

Conflicts: conflicts may occur when multiple users manipulate the same file at the same time. You can update and then edit the modification submission to avoid conflicts.

IDEA integrated SVN

Https://blog.csdn.net/shubingzhuoxue/article/details/81131724

Directory structure of SVN

Trunk: backbone directory, where the files are base files

Branches: branch directory for development

Tags: the release directory used for release

Note: the definition rule of branch: project name + date time + function point. The definition rule of Tags: project name + version number, version number is defined as three-segment number XXX.XXX.XXX, first: revolutionary product upgrade version second: new feature version, third: modified BUG

This is the end of the content of "what is the principle and function of SVN". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report