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

Build version machine based on SVN and problems encountered-1

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

Share

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

1. What is the SVN1.1 definition

1. SVN is an open source project for version control, which was founded by CollabNet in 2000. SVN currently operates as a project of the Apache Software Foundation.

2. TortoiseSVN is an Apache Subversion (SVN) client as an extension of SVN window shell.

3. VisualSVN is a professional SVN client for integration with Microsoft Visual Studio.

4. Reference link:

Http://subversion.apache.org/

Https://www.runoob.com/svn/svn-tutorial.html

Https://tortoisesvn.net/

Https://www.visualsvn.com/visualsvn/

1.2 key concepts of SVN

SVN is similar to a file system in that it records changes to each file.

L source code base: Repository

A unified repository for source code, and the actual repository is located in a directory on the SVN server.

The warehouse is the core of any version machine, the warehouse not only processes files but also has historical records, it needs to access the network and act as a server, the version control system acts as a client, and the client can connect to the warehouse. then they can store or extract from the warehouse. By saving these changes, one client's changes can be retrieved by others, and a client can make others' changes as a working copy.

L check out: checkout

It is actually an extraction, which is used to drop down the code file locally for the first time.

L submit: submit

When the code is modified and self-tested (developers test it themselves, which may include unit testing, integration testing, system testing, etc.), submit the modified code file to Repository.

Commit is the process of saving changes, from a private workspace to a central server. After submission, the changes are available to all members and are extracted by other developers by updating the working copy. Commit is an atomic operation, either all commit is successful or rollback, and the user will never see half of the commit completed.

L update: update

If someone else makes changes to the source code, you need to update the code, actually synchronizing the changed code files locally from Repository.

L backbone: trunk

It is the directory where the main developers are located and is often checked by project developers.

L tag: tags

The directory is used to store named snapshots in the project, and the tag operation allows you to give a description and an unforgettable name to a specific version in the repository. For example, LAST_STABLE_CODE_BEFORE_EMAIL_SUPPORT is more unforgettable than Repository UUID: 7ceef8cb-3799-40dd-a067-c216ec2e5247 and Revision: 13.

L branch: Branch

Branching is used to create another line of development, which is useful when you want to copy the development process into two different directions. For example, when you release version 5. 0, you may want to separate the bug fixes from 5. 0 and create a branch that develops 6. 0 features.

L working copy:

The working copy is a snapshot of the warehouse. The repository is shared by all members, but people do not modify it directly. Instead, each developer checks the working copy, which is a private workspace where developers can do their own work independently of other members.

2. TortoiseSVN installation 2.1 download

Download link on the official website:

Https://tortoisesvn.net/downloads.html

There is a language pack download below this link:

2.2 installation

Simply follow the prompts to install, and automatically add entries to the right-click menu in the file system after installation, as shown below:

3. VisualSVN installation 3.1 download

Official website link: https://www.visualsvn.com/visualsvn/download/

According to the coding specification, VS 2017 is required, so download the version for VS 2017: 6.3.1

Download file: VisualSVN-VS2017-6.3.1.vsix

3.2 installation

Double-click the installation directly:

After installation, VS2017 adds a first-level menu:

Also, add to the solution explorer right-click menu:

4. Visual Studio Project prepares 4.1 to reassign the paths to the obj and bin directories

1. C# project

Right-click the project, a pop-up menu appears, and select "Properties", as follows:

After clicking "Properties", the following interface appears:

Modify the output path. It is strongly required to locate the directory in the root directory of the warehouse or branch, using.. To represent the root directory relatively, so that you don't have to modify it every time.

2. C++ project

Slightly

3. VB project

Slightly

4.2 reassign the path to the release directory

Right-click the project, a pop-up menu appears, and select "publish", as follows:

Click "New profile." as follows:

Enter a new release directory, strongly require the directory to be located in the root directory of the warehouse or branch, and use.. To represent the root directory relatively, so that you don't have to modify it every time.

5. Common operation of SVN 5.1 Checkout

1. Get the warehouse address

For example: https://keys/svn/ test warehouse /

2. Create a new local project address

For example: d:\ test project

3. Create a local working copy

In Explorer, select the local working copy folder and right-click the menu:

Execute SVN Checkout... Later, it is as follows:

After clicking OK, if you have not connected to the SVN server, you will be prompted to output the user name and password, otherwise you will be prompted as follows:

Completed means complete, and a .svn directory is automatically generated. You should not go into this directory, especially you should not change anything under this directory. Otherwise, it is very likely that SVN will not function properly.

Because the warehouse is empty, the local working copy is also empty.

5.2 Add

Enter VS 2017 and create a new project, as follows:

Specify the location as "D:\ Test Project", which is the new local copy in 5.1 Checkout. After confirmation, it is as follows:

Select the web application, and once determined, it is as follows:

In solution Explorer, right-click the TestProject project, as follows:

After executing "Add to Subversion", it is as follows:

The small yellow dot indicates that it has been added to the local copy and is actually copied to the .svn directory.

5.3 configure ignore

Or right-click the pop-up menu on the project:

After entering the VisualSVN-- > Properties menu, click "New...", as follows:

Execute the "Other" menu, and select "Property name" as "svn:ignore"

5.4 Commit

1. Modify the new project build directory in section 5.2 Add, or right-click the project menu and select "Properties":

Select all configurations and modify the output directory to:.\..\ bin

2. Generate the solution

Solution right-click menu "build solution":

The prompt for the output window is:

There are no errors in the build process, so you can submit the code file to the repository.

2. Submit

Project right-click menu:

Select "Commit..." and be sure to enter Message to indicate which bug has been modified or which features have been added:

Tip:

After clicking OK, using the solution right-click menu to submit will not prompt an error:

After clicking OK, you find that the yellow dot turns to green:

Go to Explorer to see if the sln file is added:

The red-lined sln file is not added to the local working copy, execute the "Add" of the right-click pop-up menu:

The result is that the question mark in front of the sln file is changed to a plus sign:

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