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-2

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

Share

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

Continue "build version machine based on SVN and problems encountered-1".

2. Release

After the project right-click menu "publish", and modify the folder:

Click the "publish" button, and the output window prompts as follows:

Go to Explorer to view the local project directory:

Publish directory or question mark. Execute Add (right-click pop-up menu-- > ToitorseSVN-- > Add) and Commit (right-click pop-up menu-- > Commit) to turn green:

The deliverer can use TortoiseSVN on other PC to checkout the release directory and deploy it.

5.5 Update

SVN is mostly used by many people. The same file may still be edited. To ensure that the code files in the working directory are synchronized with Repository. Update actions are performed before editing. The premise is that you have already check out the code file once.

Suppose another colleague notifies you that Program.cs has been modified, then click "Update" in the Program.cs right-click pop-up menu:

After executing the Update, it shows:

Indicates that the update is complete.

Although it is recommended to update by file, in case you don't know which file has been updated, you can update the entire solution by executing "Update" of the right-click pop-up menu of the solution.

5.6 Update to Revision

If you want to fall back to an older version, you can use this feature:

After execution:

Click "Show log":

Click version 1 to confirm:

Perform OK:

Successfully updated to version 1.

5.7 Branch

Branches may be established for the following purposes:

(1) Development branch: copy a copy from the trunk to modify it, and merge it into the trunk after modification.

(2) Branch of the old version: the old version has been closed and the new version is ready for development, but the old version still needs to be modified, so a copy is separated from the trunk to continue the modification of the old version.

(3) Test version / official version branch: release software test version or official version for testing deployment or formal deployment.

(4) Patch version branch: because bug also needs to build a patch, does not include all files, you can keep the files that need to be updated.

The latter two are actually Release, and these versions have special meaning, a special version of Milestone or release for customers. Neither of the latter two requires merge to go back to trunk. For example, today we have a version of trunk, which is considered to be version 1.0 of the software. Version 1.0 is a very important milestone for development. So we have to make a special mark for him, that is, Tag. Suppose, this version 1.0 is to give a formal release to the customer or the relevant vendor, we want to be able to make a Release tag for him. Basically, SVN only has the concept of a directory, and there is no use of Tag. So on the menu of SVN, Branch and Tag are the same menu. For example, on Trunk, press the right mouse button and select the menu of Branch/Tag.

First, create a branches directory and Add,Commit it. The result is as follows:

Then, right-click the menu:

Execute "Branch/tag...":

The "Log Message" in the figure above should enter some explanatory text. After clicking OK:

Branch v1.1 was established successfully, but you need to update the branches directory before you can see:

The following figure shows that the branches directory is empty:

After executing the update, you can see:

You can also specify a version to establish a branch:

5.7 Merge

Code files developed on the development branch often need to be merged into the trunk, and sometimes older branches and patch branches also need to be merged into the trunk.

Where is the backbone of the project established in Section 5.2? It's actually D:\ test project\ TestProject.

First modify the branch file in v1.1:

The Program.cs in the image above is being modified or the code file has been modified locally, which is what the exclamation point on the icon means. Commit indicates that v1.1 is different from the backbone.

Right-click in the space under the explorer directory:

Execute "Merge...":

Select the first, "next >":

Under "URL to merge from", click "..." Select the branches you want to merge.

Specify the revision to be merged in "Revision range to merge", and select version 5 here.

Click "Next...":

Click "Test merge" to test it first:

This means that the merge is likely to be error-free. Confirm and return, and click "Merge":

Enter the backbone directory:

The exclamation point indicates that Program.cs has been modified. Check the internal code and submit it.

5.7 conflict and revert

When two people edit a file at the same time, it is normal for the first person to submit, the second person will be prompted to update the working copy, and a version conflict will occur when the update is confirmed. When a file conflicts, the icon of the file is an exclamation point.

Error after submission:

Another example is:

For each conflicting file, SVN places three files in your directory:

At this point, there is an option: Update before submitting. However, it may appear in the code file:

> .r16

Therefore, it is best to choose revert:

At this time, I gave up my own revision. Then use the backup file to modify it again.

There are two other options:

1. There are three options on the right-click menu on the conflict prompt:

(1) Direct marking has been resolved, which is equivalent to ignoring

(2) if theirs prevails, it means giving up oneself and admitting that others have modified it.

(3) mine prevails, that is, those who insist on themselves and abandon others

2. Delete the working directory and pull the replacement code again.

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