Handling of SVN error merging code

Time:2020-3-25

1、 Problem background

Technical background: SVN version management

The two versions (sap5.2 demand development and application for transformation) are developed in parallel. Sap5.2 is developed in trunk, and the application for transformation is developed in 6.0.1. The original plan is to go online together after 6.0.1 is merged into trunk.

Due to the delay in the application for transformation, the application for transformation cannot be launched simultaneously with the development of 5.2 requirements, but at this time, part of the 6.0.1 code (February 12, 13 and 14) has been merged into trunk, and worse, the 6.0 code (already online) has been merged into 6.0.1 before being merged into trunk.

The current problem is that the trunk code needs to be released on schedule, but the combined 6.0.1 code fails to be released to production, so the modifications made by 6.0.1 need to be removed and the modifications made by 6.0 need to be retained.
Handling of SVN error merging code

2、 Solutions

There are several schemes as follows

(1) Code 6.0.1 is restored to the branch version, modified by 6.0, and then incorporated into turnk. But this method can not eliminate the 6.0.1 modification, and the scheme is invalid.

(2) In trunk, you can change it back manually, but the cost of this change is high, all colleagues involved should participate in it, and it is easy to make mistakes. After the change, you need to test it, and the workload is heavy.

(3) The purpose of code version processing is to eliminate all changes in 6.0.1 and keep all changes in 6.0. Therefore, you can restore the changes made in 6.0.1, and then resubmit the 6.0 changes. Use this scenario. To avoid problems, all operations are performed on the new branch.

3、 Resolution process

1. Create branch, trunk branch 6.0.5, 6.0.1 branch 6.0.1.1;

2. In branch 6.0.5, use SVN tool to open the log, select 6.0.1 to merge the records, right-click and click “restore the changes made by this version”. You need to process from the higher version to the lower version in turn. In case of conflict, select “accept incoming”. After processing, submit the code.

3. Restore branch 6.0.1.1 of 6.0.1 to the branch Version (January 20 version), merge all changes of 6.0, and submit the code.

4. Finally submit branch 6.0.1.1 and merge it into 6.0.5. In the process of merging, there will be conflicts in a few files (which are adjusted in trunk and 6.0). Just resolve one by one. After processing, submit the code. So far, the 6.0.5 code has eliminated the 6.0.1 commit and merged the 6.0 version.

5. Merge 6.0.5 into the trunk. Done.

Recommended Today

NPM you don’t know

Introduction Act asnodeThe package manager tool, which comes with thenodejsCommunity andWeb front end EngineeringIn the context of growing field development,npmIt has become a necessary tool for each front-end development student. Every day, countless developers usenpmTo build the project,npm init、npm installBut most of the students only use NPMnpm installHere. (trust to deletenode_modulesFolders, re executingnpm installYou should […]