Merging conflict processing method and device
By obtaining and analyzing conflict information documents, and automatically identifying and notifying relevant modifying personnel to handle conflict files, the problem of wasting time and energy in merge conflicts is solved, and the accuracy and efficiency of the merge process are improved.
Patent Information
- Application Number
- CN202311662193.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2025-06-06
AI Technical Summary
Merge conflicts often occur during branch mergers, which causes mergers to spend a lot of time and effort to analyze the causes and solutions of the conflict, and the solutions may be inconsistent with the original intention of the modifyers, resulting in quality problems after branch mergers.
By obtaining the conflict information document associated with the target merge conflict, the document contains the modification personnel information corresponding to the conflict file, determines the target client based on the modification personnel information, and processes the conflict file through the target client to resolve the merge conflict.
The function of automatically assigning and modifying personnel is realized, solving the problem of inability to collaborate multiple people during merge conflicts, and improving the accuracy and efficiency of mergers.
Smart Images

Figure CN120106759A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a merge conflict processing method and device. Background Art
[0002] Merge conflicts often occur when branches are merged, that is, there are a large number of conflicting files. Most of the conflicting files that cause merge conflicts are modified by people other than the mergers who perform the merge. To resolve merge conflicts, the merger needs to analyze the conflict causes and solutions for all conflicting files. In this way, the merger needs to spend a lot of time and energy, which is not only time-consuming and laborious, but the solution may not be consistent with the original intention of the modifier, resulting in quality problems after the branch merge. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the invention
[0003] In view of the problems existing in the prior art, an embodiment of the present invention provides a merge conflict processing method and device.
[0004] The present invention provides a merge conflict processing method, comprising:
[0005] Obtaining a conflict information document associated with a target merge conflict, wherein the conflict information document includes information about a person who modified the conflicting file; wherein the target merge conflict refers to any merge conflict to be processed; and the merge conflict refers to a conflict or an event that cannot be merged when merging branches;
[0006] Determine the target client based on the modification personnel information;
[0007] The target merge conflict is resolved by processing the conflict file through the target client.
[0008] According to a merge conflict handling method provided by the present invention, the conflict information document further includes at least one conflict file;
[0009] The obtaining of the conflict information document associated with the target merge conflict includes:
[0010] Get at least one conflict file associated with the target merge conflict;
[0011] Collecting information about the person who modified each of the conflicting files;
[0012] The conflicting files and the information of the modifiers are archived to obtain a conflict information document associated with the target merge conflict.
[0013] According to a merge conflict handling method provided by the present invention, the collecting of modification personnel information corresponding to each of the conflicting files includes:
[0014] For the conflicting file, obtaining log information of the conflicting file;
[0015] According to the log information, the modification personnel information corresponding to the conflicting file is determined.
[0016] According to a merge conflict handling method provided by the present invention, obtaining at least one conflict file associated with a target merge conflict includes:
[0017] Get the branch information associated with the target merge conflict;
[0018] According to each branch information, each conflict file associated with the target merge conflict is collected.
[0019] According to a merge conflict handling method provided by the present invention, the conflict files and the information of the modifiers are archived to obtain a conflict information document associated with the target merge conflict, including:
[0020] The branch information, the conflict files and the personnel information are archived to obtain the conflict information document.
[0021] According to a merge conflict processing method provided by the present invention, the target client processes the conflict file to resolve the target merge conflict, including:
[0022] A conflict resolution request is sent to the target client, where the conflict resolution request is used to enable a modifier corresponding to the modifier information to modify the conflicting file.
[0023] According to a merge conflict processing method provided by the present invention, after the target client processes the conflict file to resolve the target merge conflict, the method further includes:
[0024] Receiving a modified file and modification information of the conflicting file, and repairing the conflicting file according to the modified file and the modification information;
[0025] The target merge conflict is handled according to the repaired conflict file.
[0026] According to a merge conflict handling method provided by the present invention, after receiving the modified file and modification information of the conflicting file, the method further includes:
[0027] The modified file and / or the modified information of the conflicting file are added to the conflicting information document to form a complete information document, and the complete information document is used for conflict handling testing.
[0028] According to a merge conflict handling method provided by the present invention, before receiving the modified file and modification information of the conflicting file, the method further includes:
[0029] The branch information corresponding to the modifying personnel information is sent to the target client, and the branch information is used by the target client to obtain the conflicting file.
[0030] The present invention also provides a merge conflict processing device, comprising:
[0031] An acquisition module is configured to acquire a conflict information document associated with a target merge conflict, wherein the conflict information document includes information about a person who modified the conflicting file; wherein the target merge conflict refers to any merge conflict to be processed; and the merge conflict refers to a conflict or an event that cannot be merged when merging branches;
[0032] A determination module, configured to determine a target client based on the modification personnel information;
[0033] A processing module is configured to process the conflict file through the target client to resolve the target merge conflict.
[0034] According to a merge conflict processing device provided by the present invention, the conflict information document further includes at least one conflict file;
[0035] The acquisition module is further configured to:
[0036] Get at least one conflict file associated with the target merge conflict;
[0037] Collecting information about the person who modified each of the conflicting files;
[0038] The conflicting files and the information of the modifiers are archived to obtain a conflict information document associated with the target merge conflict.
[0039] According to a merge conflict handling device provided by the present invention, the acquisition module is further configured to:
[0040] For the conflicting file, obtaining log information of the conflicting file;
[0041] According to the log information, the modification personnel information corresponding to the conflicting file is determined.
[0042] According to a merge conflict handling device provided by the present invention, the acquisition module is further configured to:
[0043] Get the branch information associated with the target merge conflict;
[0044] According to each branch information, each conflict file associated with the target merge conflict is collected.
[0045] According to a merge conflict handling device provided by the present invention, the acquisition module is further configured to:
[0046] The branch information, the conflict files and the personnel information are archived to obtain the conflict information document.
[0047] According to a merge conflict processing device provided by the present invention, the processing module is further configured to:
[0048] A conflict resolution request is sent to the target client, where the conflict resolution request is used to enable a modifier corresponding to the modifier information to modify the conflicting file.
[0049] According to a merge conflict processing device provided by the present invention, the merge conflict processing device further includes a receiving module, wherein:
[0050] The receiving module is configured to receive a modified file and modification information of the conflicting file, and repair the conflicting file according to the modified file and the modification information;
[0051] The processing module is further configured to perform conflict processing on the target merge conflict according to the repaired conflict file.
[0052] According to a merge conflict processing device provided by the present invention, the receiving module is further configured to:
[0053] The modified file and / or the modified information of the conflicting file are added to the conflicting information document to form a complete information document, and the complete information document is used for conflict handling testing.
[0054] According to a merge conflict handling device provided by the present invention, the merge conflict handling device further includes a sending module configured to:
[0055] The branch information corresponding to the modifying personnel information is sent to the target client, and the branch information is used by the target client to obtain the conflicting file.
[0056] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the merge conflict handling methods described above is implemented.
[0057] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the merge conflict handling method described in any one of the above is implemented.
[0058] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the merge conflict handling method described above is implemented.
[0059] The merge conflict processing method and device provided by the present invention obtains the conflict information document associated with the target merge conflict, wherein the conflict information document contains the information of the person who modified the conflict file; wherein the target merge conflict refers to any merge conflict to be processed; the merge conflict refers to the conflict or the event that cannot be merged when merging branches; the target client is determined based on the information of the person who modified the merge conflict; and the conflict file is processed by the target client to resolve the target merge conflict. The present invention automatically analyzes the modified person information through the conflict information document, notifies the client corresponding to the person who modified the information to process the conflict file, and splits the single conflict resolution task to different persons who modified the merge for remote parallel processing, which not only realizes the function of automatically assigning persons to modify the merge, but also solves the problem that multiple people cannot collaborate when there is a merge conflict, and also improves the accuracy and efficiency of the merge. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 This is one of the flow charts of the merge conflict handling method provided by the present invention;
[0062] Figure 2 It is a schematic diagram of a process of generating a merge conflict provided by the present invention;
[0063] Figure 3 It is a schematic diagram of the interface of the conflict information document provided by the present invention;
[0064] Figure 4 This is the second flow chart of the merge conflict handling method provided by the present invention;
[0065] Figure 5 This is one of the interface diagrams of the server-side merging tool provided by the present invention;
[0066] Figure 6 This is the second interface diagram of the server-side merging tool provided by the present invention;
[0067] Figure 7 This is one of the interface diagrams of the client merging tool provided by the present invention;
[0068] Figure 8 This is the second interface diagram of the client merging tool provided by the present invention;
[0069] Fig. 9 This is the third interface diagram of the client merging tool provided by the present invention;
[0070] Fig.10 This is the fourth interface diagram of the client merging tool provided by the present invention;
[0071] Fig.11 This is the third interface diagram of the server-side merging tool provided by the present invention;
[0072] Fig.12 It is a structural schematic diagram of the merge conflict processing device provided by the present invention;
[0073] Fig.13 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] In order to facilitate a clearer understanding of the embodiments of the present invention, some terms involved in the present invention are first explained.
[0076] Version control tool: is a distributed version control system used to track and manage source code for software development projects.
[0077] Repository: A place where all versions and history of a project are stored.
[0078] Branch: A feature used to create parallel development lines in a code repository. Each branch has its own commit history and can be developed and merged independently.
[0079] Commit: The operation of saving changes to a code repository. Each commit has a unique identifier, called a SHA-1 hash.
[0080] Merge: Merge changes from one branch into another.
[0081] Remote Repository: A code repository located on the Internet that allows multiple editors to share and collaborate.
[0082] Clone: Copy the remote repository to the local repository to create a copy of the local repository.
[0083] Pull: Get the latest changes from the remote repository and merge them into the local repository.
[0084] Push: Upload changes from the local repository to the remote repository.
[0085] Then, some relevant background knowledge is introduced as follows.
[0086] In software development, the source code of the project is basically controlled by version control tools. In multi-person development, version control tools are very useful tools that provide powerful functions to support team collaboration and version control. Version control tools are often used in engineering projects of some application software (such as file editing software) for software development.
[0087] In application software, each independent engineering project has a central remote repository (i.e., remote repository) as the main repository for code. Modifiers can clone code from the remote repository to their local repository and push the changed code back to the remote repository. This enables code sharing and collaboration among development members of the engineering project team.
[0088] Each editor can create his own branch in the version control tool to independently develop features or fix bugs. This avoids making changes directly on the main branch and maintains the stability of the main branch. Each branch can be developed and tested separately, and then the changes can be merged back to the main branch through the merge operation.
[0089] Because multiple people develop the same application, different editors may modify the same file at the same time, resulting in conflicts. Version control tools provide a conflict resolution mechanism. When a conflict occurs, editors can manually resolve the conflict and mark the solution. After all conflicting files are resolved, the changes will be merged into the code repository, that is, the files with resolved conflicts will be merged into the code repository.
[0090] Since application software projects are relatively large, merge conflicts often occur when branches are merged, that is, there are a large number of conflicting files. Most of the conflicting files that have merge conflicts are modified by people other than the mergers who perform the merge. Usually, this situation is very troublesome. The most primitive approach is that the merger needs to analyze the conflict causes and solutions for all conflicting files. In this way, the merger needs to spend a lot of time and energy, which is not only time-consuming and laborious, but the solution may not be consistent with the original intention of the modifier, resulting in quality problems after the branch merge.
[0091] In addition, the merger usually opens a temporary host that supports remote editing as a conflict resolution method. Then the person who edited the conflicting file (such as the original author) is notified to modify the conflicting file on the remote host. Since the remote host to the same host only supports one person at a time, that is, it does not support multiple people operating at the same time, so one person can only make changes after one person makes the changes before notifying the next person to make the changes. It is impossible to resolve merge conflicts in parallel.
[0092] Therefore, the present invention provides a merge conflict processing method and device, by obtaining a conflict information document associated with a target merge conflict, the conflict information document contains information about a person who modifies the conflict file; determining a target client based on the information about the person who modifies the conflict file; and processing the conflict file through the target client to resolve the target merge conflict. The present invention automatically analyzes the modified person information through the conflict information document, notifies the client corresponding to the person who modifies the information to process the conflict file, and splits a single conflict resolution task to different people who modify the conflict for remote parallel processing, which not only realizes the function of automatically assigning people to modify the conflict, but also solves the problem of multiple people being unable to collaborate during a merge conflict, and also improves the accuracy and efficiency of the merge.
[0093] Combine the following Figure 1-Figure 5 The merge conflict handling method and device of the present invention are described.
[0094] The merge conflict handling method and device provided by the present invention can be applied to scenarios of merge functions such as merging of various code version control systems, and is mainly applied to code merging scenarios of version control tool projects.
[0095] Figure 1 This is one of the flow charts of the merge conflict handling method provided by the present invention, see Figure 1 As shown, it includes steps 101 to 102, wherein:
[0096] Step 101: Obtain a conflict information document associated with a target merge conflict, wherein the conflict information document contains information about the person who modified the conflicting file; wherein the target merge conflict refers to any merge conflict to be processed; and the merge conflict refers to a conflict or an event that cannot be merged when branches are merged.
[0097] First of all, it should be noted that the executor of the present invention can be any electronic device that handles merge conflicts, such as a smart phone, a smart watch, a desktop computer, a laptop, etc.; it mainly refers to the server or the client corresponding to the merger.
[0098] Specifically, a merge conflict refers to a conflict or an event that cannot be merged when merging branches. A target merge conflict refers to any merge conflict that needs to be resolved or processed. A conflict information document refers to a document that records the content related to the merge conflict. The conflict information document associated with the target merge conflict refers to a document that records the content related to the target merge conflict. A conflict file refers to a group of files that are in conflict. For example, when merging, file a and file b need to be merged, but file a and file b are incompatible with each other, then file a and file b are conflicting files. The modifier corresponding to the conflicting file refers to the person who modifies, develops or manages the conflicting file. The modifier information is used to characterize the modifier, and can be at least one of the modifier's name, account number, mobile phone number, code name, ID number, ID number, work number, email address, and work computer identification.
[0099] Obtain the conflict information document associated with the target merge conflict, that is, obtain the conflict information document for the branch where the merge conflict occurs, or obtain the conflict information document when there is a conflict in the branch merge.
[0100] In actual applications, there are many reasons for merge conflicts in the version control system project:
[0101] 1) Multiple branches of a file have different modifications: When multiple editors modify the same file at the same time, different editors may submit the modifications to different branches. If each editor submits the modified file to their own corresponding branch, conflicts may occur, that is, merge conflicts. Figure 2 The process diagram of generating merge conflicts provided by the present invention is explained by taking developers as the modifiers as an example: developer 1 modifies file 1 and submits it to branch 1 containing file 2. At the same time, developer 2 modifies file 1 and submits it to branch 2 containing file 2. When the merger merges branches 1 and 2 to generate a merged branch 3, a merge conflict will be generated due to file 1, i.e., "File 1, conflict!", while file 2 will not generate a merge conflict because it has not been modified.
[0102] 2) Automatic merge fails when merging branches: When trying to merge one branch into another, the version control tool may not be able to automatically resolve all merges. For example, if the modifications on two branches are incompatible, the version control tool cannot automatically merge the two branches, resulting in a merge conflict.
[0103] 3) When modifying the code, the local repository is not updated in time: If there are uncommitted modified files in the local repository corresponding to the current modifier, and another modifier has pushed the modified files to the remote repository, then a merge conflict will occur when the current modifier tries to push his own modified files.
[0104] 4) Renaming files or folders: If one editor renames a file or folder and another editor also modifies the file or folder at the same time, it will cause a merge conflict.
[0105] 5) Different modifications to the same line of code: If two editors make different modifications to the same line of code, a merge conflict will occur.
[0106] For the merge conflicts that occur, you can handle them in time, or add them to the merge conflict repository for subsequent processing.
[0107] Before obtaining the conflict information document associated with the target merge conflict, the target merge conflict needs to be determined. There are many ways to determine the target merge conflict: for example, when a branch is merged, if a merge conflict occurs, the merge conflict can be used as the target merge conflict; for another example, an unresolved merge conflict can be selected from the merge conflict repository as the target merge conflict. It can also be any other way of determining the target merge conflict now or in the future, and the present invention does not limit this.
[0108] It should be noted that when selecting an unprocessed merge conflict from the merge conflict repository as the target merge conflict: the target merge conflict can be selected from all unprocessed merge conflicts; the target merge conflict can be randomly selected from all unprocessed merge conflicts according to the order in which the merge conflicts occurred, such as selecting the earliest unprocessed merge conflict as the target merge conflict; the target merge conflict can be selected from all unprocessed merge conflicts according to the importance of the merge conflicts, such as selecting the most important unprocessed merge conflict as the target merge conflict. The present invention does not make any limitation to this.
[0109] In addition, all unprocessed merge conflicts in the merge conflict repository can be processed in a single-threaded manner, that is, one target merge conflict is determined for processing each time. It can also be processed in a multi-threaded manner, that is, multiple target merge conflicts are determined, and each thread processes each target merge conflict in parallel, and one thread processes one target merge conflict at a time; when a thread in the multi-threaded process has completed processing, a new target merge conflict is re-determined for the thread to process, and so on.
[0110] After the target merge conflict is determined, it is necessary to obtain the conflict information document associated with the target merge conflict. There are many ways to obtain the conflict information document associated with the target merge conflict. For example, the merger uploads the conflict information document associated with the target merge conflict through the upload page provided by the merge conflict handling platform, and accordingly, the execution subject obtains the conflict information document associated with the target merge conflict. For another example, the execution subject receives a merge conflict handling instruction or a conflict information document acquisition instruction, and accordingly, the execution subject obtains the conflict information document associated with the target merge conflict from the storage area pointed to by the merge conflict handling instruction or the conflict information document acquisition instruction. For another example, the conflict information document is obtained according to the identifier of the target merge conflict. The present invention does not impose any limitation on this.
[0111] It should be noted that the conflict information document contains the information of the person who modified each conflicting file that causes the target merge conflict.
[0112] Step 102: Determine the target client based on the modification personnel information.
[0113] On the basis of obtaining the conflict information document, further, according to the modification personnel information corresponding to each conflict file recorded in the conflict information document, the target client corresponding to each modification personnel information is determined.
[0114] Exemplarily, the modifier information is the modifier's account, and the target client associated with the modifier is determined based on the account.
[0115] Step 103: Processing the conflicting file through the target client to resolve the target merge conflict.
[0116] On the basis of determining the target client, further, the editors corresponding to each conflicting file are notified to jointly resolve the target merge conflict, that is, the editors are reminded through the target client to modify the conflicting files to resolve the target merge conflict.
[0117] The merge conflict handling method provided by the present invention obtains a conflict information document associated with a target merge conflict, wherein the conflict information document contains information about the person who modified the conflict file; wherein the target merge conflict refers to any merge conflict to be handled; the merge conflict refers to a conflict or an event that cannot be merged when branches are merged; a target client is determined based on the information about the person who modified the merge conflict; and the conflict file is processed by the target client to resolve the target merge conflict. The present invention automatically analyzes the modified person information through the conflict information document, notifies the client corresponding to the person who modified the information to process the conflict file, and splits a single conflict resolution task to different people who modified the merge for remote parallel processing, which not only realizes the function of automatically assigning people to modify the merge, but also solves the problem that multiple people cannot collaborate when there is a merge conflict, and also improves the accuracy and efficiency of the merge.
[0118] In one or more optional embodiments of the present invention, the conflict information document further includes at least one conflict file; the obtaining of the conflict information document associated with the target merge conflict may be specifically implemented as follows:
[0119] Get at least one conflict file associated with the target merge conflict;
[0120] Collecting information about the person who modified each of the conflicting files;
[0121] The conflicting files and the information of the modifiers are archived to obtain a conflict information document associated with the target merge conflict.
[0122] In practical applications, for a target merge conflict, all conflicting files associated with the target merge conflict can be obtained, that is, all conflicting files when the target merge conflict occurs can be counted. Furthermore, for each conflicting file, the corresponding modification personnel information of the conflicting file is collected, such as obtaining the corresponding modification personnel information of the conflicting file according to the identification and upload path of the conflicting file.
[0123] After obtaining each conflicting file and the corresponding modification personnel information of each conflicting file, each conflicting file and the corresponding modification personnel information are archived to obtain a conflict information document associated with the target merge conflict, wherein the conflicting file and the corresponding modification personnel information are associated in the conflict information document.
[0124] In this way, by obtaining the conflict file, and then obtaining the information of the person who made the changes based on the conflict file, and then archiving it to form a conflict information document, the correctness and reliability of the conflict information document can be guaranteed, thereby improving the efficiency of merge conflict processing.
[0125] In one or more optional embodiments of the present invention, the collection of the modification personnel information corresponding to each of the conflicting files may be specifically implemented as follows:
[0126] For the conflicting file, obtaining log information of the conflicting file;
[0127] According to the log information, the modification personnel information corresponding to the conflicting file is determined.
[0128] Specifically, log information refers to the information contained in the log, that is, event records, and the log information includes relevant information such as date, time, user and action.
[0129] In practical applications, for each conflicting file, the log of the conflicting file can be obtained according to the flag of the conflicting file to obtain log information. Then, the user corresponding to the conflicting file, that is, the information of the person who modified the conflicting file, is extracted from the log information. Each conflicting file is traversed to determine the information of the person who modified the conflicting file.
[0130] In addition, the log information of the current conflicting files can be obtained in sequence starting from the first conflicting file, and the modification personnel information corresponding to the current conflicting files can be determined according to the log information until the last conflicting file. The log information of each conflicting file can also be obtained in parallel, and the modification personnel information corresponding to each conflicting file can be determined according to the log information of each conflicting file. The present invention does not make any limitation to this.
[0131] In this way, by obtaining log information and determining the information of the person who modified the information based on the log information, the efficiency and accuracy of collecting the information of the person who modified the information can be improved to a certain extent.
[0132] It should be noted that since the conflict file refers to a group of files that conflict, the conflict file contains at least two sub-files, where the sub-files are modified files or modified contents in the branch. The modifier information corresponding to each sub-file contained in the conflict file may not be the same. At this time, the modifier information corresponding to each sub-file can be used as the modifier information corresponding to the conflict file, or the modifier information corresponding to the conflict file can be selected from the modifier information corresponding to each sub-file according to certain rules.
[0133] In an optional embodiment of the present invention, the conflict file includes at least two sub-files; the log information of the conflict file is obtained; and according to the log information, the information of the person who modified the conflict file is determined. The specific implementation process may be as follows:
[0134] Obtain log information of each sub-file in the conflict file;
[0135] For each of the sub-files, extracting the initial modification person information and time information corresponding to the sub-file from the log information of the sub-file;
[0136] According to each of the time information, the target modifier information corresponding to the conflicting file is determined from each of the initial modifier information.
[0137] Specifically, the time information may be at least one of the upload time, completion time, and submission time of the sub-file.
[0138] In actual application, for each sub-file in the conflict file, the log information of the current sub-file is obtained, and the initial modification personnel information and time information corresponding to the current sub-file are extracted from the log information. Each sub-file is traversed to obtain the initial modification personnel information and time information corresponding to each sub-file.
[0139] Furthermore, each piece of time information is compared, and the initial modification personnel information corresponding to the time information that meets the first setting condition is used as the target modification personnel information corresponding to the conflicting file.
[0140] For example, if the first setting condition is the earliest time, then the time information is compared, and the earliest time information among the time information is used as the target time information, and the initial modification personnel information corresponding to the target time information is used as the target modification personnel information corresponding to the conflict file. In this way, the modification personnel who first processed the project in the conflict file can process the conflict file, ensuring that the processing result of the conflict file meets the intention of the modification personnel who first processed the project, so that the project after the merge conflict is resolved is consistent with the development intention of the modification personnel, and improving personnel satisfaction.
[0141] Exemplarily, the first setting condition is the latest time, then each time information is compared, and the time information representing the latest time among each time information is used as the target time information, and the initial modification personnel information corresponding to the target time information is used as the target modification personnel information corresponding to the conflict file. Since the target modification personnel information corresponds to the modification personnel who processed the project latest, and the sub-file corresponding to the modification personnel is the key to the conflict file, the modification personnel who processed the project latest in the conflict file is used to process the conflict file. The modification personnel can process the sub-file corresponding to the conflict file without processing other sub-files, and the conflict file can be processed, thereby reducing the amount of data for merge conflict processing and improving the efficiency of merge conflict processing.
[0142] In another optional embodiment of the present invention, the conflict file includes at least two sub-files; the log information of the conflict file is obtained; and according to the log information, the information of the person who modified the conflict file is determined. The specific implementation process may be as follows:
[0143] Obtaining initial log information of each sub-file in the conflict file, wherein the initial log information carries a timestamp;
[0144] Determine target log information from each of the initial log information according to each of the timestamps;
[0145] The modification personnel information corresponding to the conflicting file is extracted from the target log information.
[0146] Specifically, the timestamp may be the generation time or creation time of the log information.
[0147] In actual application, the initial log information of each sub-file in the conflict file is obtained. Then the timestamps carried by each initial log information are compared, and the initial log information corresponding to the timestamp that meets the second setting condition is used as the target log information. Then the modification personnel information corresponding to the conflict file is extracted from the target log information.
[0148] Exemplarily, if the second setting condition is the earliest time, the timestamps carried by each initial log information are compared, and the earliest timestamp among the timestamps is used as the target timestamp, and the initial log information corresponding to the target timestamp is used as the target log information of the conflict file, and the target modifier information corresponding to the conflict file is extracted from the target log information. In this way, the modifier who first processes the project in the conflict file can process the conflict file, ensuring that the processing result of the conflict file meets the intention of the modifier who first processes the project, so that the project after the merge conflict is resolved is consistent with the development intention of the modifier, improving personnel satisfaction.
[0149] Exemplarily, the second setting condition is the latest time, then the timestamps carried by each initial log information are compared, the latest timestamp among the timestamps is used as the target timestamp, the initial log information corresponding to the target timestamp is used as the target log information of the conflict file, and the target modifier information corresponding to the conflict file is extracted from the target log information. Since the target modifier information corresponds to the modifier who processed the project latest, and the sub-file corresponding to the modifier is the key to the conflict file, the modifier who processed the project latest in the conflict file is made to process the conflict file. The modifier can process the sub-file corresponding to the conflict file without processing other sub-files, and the conflict file can be processed, which reduces the amount of data for merge conflict processing and improves the efficiency of merge conflict processing.
[0150] In another optional embodiment of the present invention, the conflict file includes at least two sub-files; the log information of the conflict file is obtained; and according to the log information, the information of the person who modified the conflict file is determined. The specific implementation process may be as follows:
[0151] Obtain log information of each sub-file in the conflict file;
[0152] For each of the sub-files, extracting the initial modification personnel information corresponding to the sub-file from the log information of the sub-file, wherein the initial modification personnel information includes employee position information;
[0153] According to each of the employee position information, the target modifying personnel information corresponding to the conflicting file is determined from each of the initial modifying personnel information.
[0154] Specifically, the employee position information represents the employee's position, such as manager, team leader, supervisor, etc.
[0155] In actual application, for each sub-file in the conflict file, the log information of the current sub-file is obtained, and the initial modification personnel information and time information corresponding to the current sub-file are extracted from the log information. Each sub-file is traversed to obtain the initial modification personnel information corresponding to each sub-file.
[0156] Furthermore, the employee position information in each of the initial modified personnel information is compared, and the initial modified personnel information corresponding to the employee position information that meets the third setting condition is used as the target modified personnel information corresponding to the conflicting file.
[0157] For example, if the third setting condition is the earliest position, then the position information of each employee is compared, and the position information of the employee representing the earliest position among the position information of each employee is used as the target employee position information, and the initial modification personnel information corresponding to the target employee position information is used as the target modification personnel information corresponding to the conflict file. Generally speaking, the higher the position, the stronger the processing ability, so that the modification personnel with the highest position in the conflict file who processes the project processes the conflict file, it can ensure that the processing result of the conflict file meets the project development intention and improve personnel satisfaction.
[0158] In another optional embodiment of the present invention, the conflict file includes at least two sub-files; the log information of the conflict file is obtained; and according to the log information, the information of the person who modified the conflict file is determined. The specific implementation process may be as follows:
[0159] Obtaining the importance level of each sub-file in the conflict file;
[0160] According to each of the importance levels, determining a target subfile from each of the subfiles;
[0161] Obtain log information of the target sub-file;
[0162] The modification personnel information corresponding to the conflicting file is extracted from the log information.
[0163] Specifically, the importance level represents the importance of the sub-file, and the higher the importance level, the greater the importance.
[0164] In actual application, for each subfile in the conflict file, the importance level of the current subfile is obtained. The importance levels of the subfiles are compared, and the subfile corresponding to the importance level that meets the fourth setting condition is used as the target subfile. Then, the log information of the target subfile is obtained, and the modification personnel information corresponding to the conflict file is extracted from the log information.
[0165] For example, the fourth setting condition is that the importance level is the highest, then the importance levels are compared, the highest importance level among the importance levels is used as the target importance level, and the sub-file corresponding to the target importance level is used as the target sub-file. Then the log information of the sub-file is obtained, and the modification personnel information in the log information is extracted as the modification personnel information corresponding to the conflicting file. In this way, the modification personnel of the most important sub-file can process the conflicting file, which can ensure that the processing result of the conflicting file meets the project development intention and improves the personnel satisfaction.
[0166] In one or more optional embodiments of the present invention, the obtaining of at least one conflict file associated with the target merge conflict may be specifically implemented as follows:
[0167] Get the branch information associated with the target merge conflict;
[0168] According to each branch information, each conflict file associated with the target merge conflict is collected.
[0169] Specifically, the branch information refers to information contained in the branch to be merged or refers to information representing the branch.
[0170] In practical applications, if the branch information is information contained in the branch to be merged, the branch information corresponding to each branch can be obtained from each branch that generates the target merge conflict. Then, for each branch information, the conflict file corresponding to the target merge conflict is extracted from the branch information.
[0171] If the branch information refers to information representing a branch, the branch information causing the target merge conflict may be obtained first, and then, for each branch information, the conflict file corresponding to the target merge conflict is extracted from the branch represented by the branch information.
[0172] In this way, by obtaining the conflicting files through branch information, the accuracy and reliability of obtaining the conflicting files can be guaranteed.
[0173] In one or more optional embodiments of the present invention, the conflict files and the information of the modifiers are archived to obtain the conflict information document associated with the target merge conflict. The specific implementation process may be as follows:
[0174] The branch information, the conflict files and the personnel information are archived to obtain the conflict information document.
[0175] Specifically, see Figure 3 The interface schematic diagram of the conflict information document provided by the present invention is shown, and the display of the conflict information document in the table editing software is used as an example for explanation: the interface includes a menu bar, a field configuration bar, the name of the conflict information document, the specific content of the conflict information document (as shown in the text and data in the cells), Table 1 and Table 2 under the conflict information document (the current interface displays Table 1), a minimize control, a maximize control, a close control, and document display parameters, such as zoom factor, view type, etc.
[0176] Among them, the field configuration bar includes the hit cell and field algorithm selection area.
[0177] In the conflict information document, AF is used as the row label and 1-6 is used as the column label. The first row displays the table header: conflict type, conflict file, current branch information, merged branch information, personnel information (i.e., modified personnel information) and impact surface. That is, the conflict information document may contain at least one of the following information: conflict type, conflict file, current branch information, merged branch information, personnel information and impact surface.
[0178] The influence area may be at least one of a domestic influence area, an overseas influence area, and an enterprise influence area.
[0179] In actual applications, to ensure the integrity of the conflict information document, the branch information can also be archived in the conflict information document. That is, each branch information, each conflict file, and each modification personnel information are archived to form a conflict information document associated with the target merge conflict. Among them, the conflict file in the conflict information document is associated with its corresponding branch information and modification personnel information. Based on archiving the branch information, each conflict file, and each personnel information, the integrity and orderliness of the conflict information document can be guaranteed.
[0180] In one or more optional embodiments of the present invention, processing the conflict file by the target client to resolve the target merge conflict includes:
[0181] A conflict resolution request is sent to the target client, where the conflict resolution request is used to enable a modifier corresponding to the modifier information to modify the conflicting file.
[0182] In actual applications, the execution subject determines the target client corresponding to each modifier after determining the information of each modifier. Then, for each target client, a conflict resolution request is generated, and then the conflict resolution request is sent to the target client corresponding to the modifier, so that each modifier can work together to resolve the target merge conflict. For example, by notifying each modifier to work together to resolve the target merge conflict in the form of a reminder, the time for resolving conflicting files can be greatly shortened.
[0183] It should be noted that the conflict resolution request may carry the file identifier of the conflict file, such as the file name. For example, the file identifier of conflict file A is M, and the information of the person who modified conflict file A is the information of person m. The conflict resolution request carrying M is sent to the client corresponding to the information of person m, so that person m determines that the conflict file to be processed is conflict file A according to M in the conflict resolution request. In this way, the accuracy and efficiency of conflict file processing can be guaranteed.
[0184] In one or more optional embodiments of the present invention, after processing the conflict file by the target client to resolve the target merge conflict, the method further includes:
[0185] Receiving a modified file and modification information of the conflicting file, and repairing the conflicting file according to the modified file and the modification information;
[0186] The target merge conflict is handled according to the repaired conflict file.
[0187] Specifically, the modified file refers to a file formed after modifying and adjusting the conflicting file. The modification information represents information such as the content, location, time and method of modifying the conflicting file.
[0188] In actual applications, after notifying each target client of the conflicting files to be processed, the editor corresponding to the target client modifies the conflicting files through the target client, thereby forming a modified file and modification information of the conflicting files, and sends the modified file and modification information of the conflicting files to the server or the client corresponding to the merger, i.e., the execution subject, through the target client. Accordingly, the execution subject receives the modified file and modification information of the conflicting files.
[0189] Further, the execution subject repairs the conflict file according to the modified file and the modification information to obtain the repaired conflict file. All conflict files are traversed to obtain all repaired conflict files. Then all repaired conflict files are submitted to the service processor for processing, that is, merge conflict processing is performed on the target merge conflict.
[0190] In this way, by modifying the file and the modification information, the conflicting file is repaired and the target merge conflict is handled, which is conducive to improving the accuracy of the processing.
[0191] It should be noted that the execution subject can start the request merge service, then publish the online conflict file, notify each editor to modify it through the target client, and wait for others (editors) to connect and merge together. Further, after receiving the notification, the editor will start the merge tool through its corresponding target client and connect to the server, that is, connect to the connection and merge together, so that the editor can process its corresponding conflict file.
[0192] In one or more optional embodiments of the present invention, after receiving the modified file and modification information of the conflicting file, the method further includes:
[0193] The modified file and / or the modified information of the conflicting file are added to the conflicting information document to form a complete information document, and the complete information document is used for conflict handling testing.
[0194] Specifically, the conflict handling test refers to a measurement and / or experiment aimed at conflict handling. The conflict handling test can be used to optimize the execution subject to improve the execution subject's ability to automatically resolve conflicts.
[0195] In actual applications, after receiving the modified file and modification information of the conflicting file, the modified file can be filed into the conflict information document, and associated with the corresponding conflicting file to obtain a complete information document; the modified information can also be filed into the conflict information document, and associated with the conflicting file associated with it, that is, the modified information is supplemented in the conflict information document to obtain a complete information document; the modified file and the modified information can also be filed together into the conflict information document, and associated with the conflicting file associated with it to obtain a complete information document. The obtained complete information document can be sent to the tester, because the tester uses the complete information document as the test point for conflict handling test. In this way, not only can the record be saved, but also after the conflict handling test is completed, merge conflict handling can be performed to ensure the success rate of merge conflict handling.
[0196] In one or more optional embodiments of the present invention, before receiving the modified file and modification information of the conflicting file, the method further includes:
[0197] The branch information corresponding to the modifying personnel information is sent to the target client, and the branch information is used by the target client to obtain the conflicting file.
[0198] In actual applications, when the execution subject is successfully connected to the target client associated with the modifier information, that is, when the connection with the target client is successful, the branch information corresponding to the conflict file corresponding to the modifier information can be sent to the target client. The modifier corresponding to the target client obtains the corresponding conflict file based on the branch information, and then modifies the conflict file to handle the merge conflict. In this way, the accuracy and efficiency of obtaining the conflict file can be improved, thereby improving the efficiency and accuracy of handling the merge conflict.
[0199] Exemplarily, the execution subject notifies the editor corresponding to the target client to handle the conflicting files. Further, after receiving the notification, the editor will start the merge tool through the target client and connect to the server, and then send the version information to the server. The server verifies the version information and sends the merged branch information to the target client after verification, that is, the branch information corresponding to the editor information. The editor synchronizes the branch information with the local repository of the version control tool through the target client, obtains the conflicting files, and then resolves the assigned conflicting files.
[0200] In the embodiment provided by the present invention, when merging projects developed by multiple editors, multiple file conflicts occur, and each conflicting file is caused by changes made by different editors. Using the merge conflict handling method or tool provided by the present invention, all conflicting files can be collected, and the editor corresponding to the conflicting file (editing personnel information) can be automatically found based on the log information of each conflicting file. Finally, a document (conflict information document) can be generated. According to the conflict information document, the editors corresponding to each conflicting file can be notified to solve the problem together, which can greatly shorten the time for resolving merge conflicts.
[0201] Combine the following Figure 4 The merge conflict handling method provided by the present invention is further described. Figure 4 , Figure 4 This is the second flow chart of the merge conflict handling method provided by the present invention.
[0202] The merger determines the target merge conflict to be processed from the merge conflict repository of the version control tool and starts the merge tool (server), that is, starts the merge tool on the server, such as Figure 5 As shown, Figure 5 This is one of the interface diagrams of the server-side merging tool provided by the present invention. Figure 5 , the interface of the server-side merge tool includes the name of the merge tool (Merge Conflict Synchronization Service), the "Version Control Tool Project Location" field, an input box for filling in the location, the "Port" field, an input box for filling in the port, a "Generate Merge Conflict Document" button, a "Help" button, a "Request Others to Merge" button, a "Refresh Status" button, a display area, and a "Generate Report" button.
[0203] The server-side merge tool collects branch information for target merge conflicts; collects conflicting files based on the branch information; and collects information about the person who modified the conflicting files from the log information of the conflicting files. Furthermore, the branch information, conflicting files, and the information about the person who modified the conflicting files are archived to generate a conflict information document. Figure 5 Click the "Generate Merge Conflict Document" button in the command prompt to generate the conflict information document, and get the interface of the server-side merge tool containing the conflict information document, such as Figure 6 As shown, Figure 6 This is the second interface diagram of the server-side merging tool provided by the present invention. Figure 5 Based on Figure 5 , the merge conflict document will be displayed in the display area of the server-side merge tool, including the conflicting file, current branch information, merged branch information, and whether it is resolved.
[0204] Further, start the request merging service, that is, trigger Figure 6 Click the "Request others to merge" button, then publish the conflicting files online, notify each editor to make changes through the target client corresponding to the editor information, and wait for others (editors) to connect and merge together.
[0205] Furthermore, after receiving the notification, the editor will start the merge tool through the corresponding target client and connect to the server, that is, connect to the connection and merge together, such as Figure 7 As shown, Figure 7 This is one of the interface diagrams of the client merging tool provided by the present invention. Figure 7 In the interface of the client merge tool, there are the "Client" logo, the "IP" field, an input box for filling in the server IP, the "Port" field, an input box for filling in the port, the "Username" field, an input box for filling in the user name, the "Connect to Service" button, the "Version Control Tool Project Location" field, an input box for filling in the location, the "Synchronize Merge" button, the "Refresh Conflicts" button, the display area, the "Add Other Modified Files" button, and the "Submit Changes" button. After entering the IP, port, user name, and version control tool project location, the client merge tool connects to the server after the "Connect to Service" button is triggered.
[0206] Next, the target client where the modifier is located sends version information to the server, which verifies the version information and sends the merged branch information to the target client after verification, that is, the branch information corresponding to the modifier information. Figure 7 Based on Figure 8 , Figure 8This is the second interface diagram of the client merge tool provided by the present invention: the merge conflict document is displayed in the display area of the client merge tool, including the conflict file, the current branch information, the merged branch information and whether it is resolved.
[0207] The editor synchronizes the branch information with the local repository of the version control tool through the client, obtains the conflicting files, and then resolves the assigned conflicting files to form modified files and modification information. Figure 8 See on the basis of Fig. 9 , Fig. 9 This is the third interface diagram of the client merge tool provided by the present invention. For a certain conflicting file, the merged branch information is modified by triggering the "Add other modified files" button. If the conflicting file can be resolved, the "Is it resolved" field of the conflicting file will be "Yes". When the "Refresh Conflicts" button is triggered, the content corresponding to the conflicting file will be highlighted.
[0208] Furthermore, the modified file and modification information are sent to the server. Fig. 9 After clicking the "Submit Changes" button in the merge tool window, you will be redirected to the client merge tool's submission interface. Fig.10 As shown, Fig.10 This is the fourth interface diagram of the client merging tool provided by the present invention. Among them, the interface for submission of the client merging tool includes a "Submit modification log" logo, a "Conflicting file" field, a display box for displaying the conflicting file (such as...), a "Submit" field, a selection box for checking the conflicting file, a "Domestic impact" field, an input box for filling in the domestic impact, an "Overseas impact" field, an input box for filling in the overseas impact, a "Enterprise impact" field, an input box for filling in the enterprise impact, a "Submit" button and a "Cancel" button. Among them, after the "Submit" button is triggered after selecting the corresponding conflicting file through the selection box, the modified file and modification information corresponding to the conflicting file are submitted to the server; if the "Cancel" button is triggered, it returns Fig. 9 The interface shown.
[0209] Accordingly, the server collects the modified files and modification information, and Figure 6 See on the basis of Fig.11 , Fig.11This is the third interface diagram of the server-side merge tool provided by the present invention: in this interface, while displaying "Merge Conflict Synchronization Service", it also displays the server's "IP:******" and "Port:***". Since the "Request Others to Merge" button has been triggered and the modified file and modification information have been received, the "Request Others to Merge" button has been changed to the "Stop Service" button. In addition, if the modified file and modification information of a conflicting file are received, the "Is Resolved" field of the conflicting file will be "Yes". When the "Refresh Status" button is triggered, the content corresponding to the conflicting file will be highlighted.
[0210] Furthermore, based on the modified files and modification information, the conflicting files in the version control tool merge conflict repository are repaired, that is, the conflicting files are repaired, and all the repaired conflicting files are submitted to the version control tool service, that is, all the repaired conflicting files are submitted to the version control tool service to achieve the target merge conflict processing.
[0211] In addition, after collecting the modified files and modification information, the modified information can be filed in the conflict information document and associated with the corresponding conflict file, that is, the modification information is supplemented in the conflict information document to generate a complete information document. Further, the complete information document is submitted to the tester as a test point for conflict handling testing.
[0212] In view of the fact that version control tools are commonly used to manage projects in current software development, the merge conflict handling method provided by the present invention can quickly start the merge service, assist in completing the processing of conflict files of the version control tool, split the task originally concentrated on a single person and distribute it to multiple people; and can modify the log according to the conflict document and quickly output the document; it is convenient to track the changes and maintain them later.
[0213] The merge conflict processing device provided by the present invention is described below. The merge conflict processing device described below and the merge conflict processing method described above can be referred to each other.
[0214] Fig.12 is a schematic diagram of the structure of the merge conflict processing device provided by the present invention, such as Fig.12 As shown, the merge conflict processing device 1200 includes: an acquisition module 1201, a determination module 1202 and a processing module 1203, wherein:
[0215] The acquisition module 1201 is configured to acquire a conflict information document associated with a target merge conflict, wherein the conflict information document includes information about a person who modified the conflicting file; wherein the target merge conflict refers to any merge conflict to be processed; and the merge conflict refers to a conflict or an event that cannot be merged when merging branches;
[0216] A determination module 1202 is configured to determine a target client based on the modification personnel information;
[0217] The processing module 1203 is configured to process the conflict file through the target client to resolve the target merge conflict.
[0218] The merge conflict processing device provided by the present invention obtains a conflict information document associated with a target merge conflict, wherein the conflict information document contains information about a person who modifies the conflict file; determines a target client based on the information about the person who modifies the conflict file; and processes the conflict file through the target client to resolve the target merge conflict. The present invention automatically analyzes the modified person information through the conflict information document, notifies the client corresponding to the person who modifies the information to process the conflict file, and splits a single conflict resolution task to different people who modify the conflict for remote parallel processing, which not only realizes the function of automatically assigning people to modify the conflict, but also solves the problem of multiple people being unable to collaborate when there is a merge conflict, and also improves the accuracy and efficiency of the merge.
[0219] In one or more optional embodiments of the present invention, the conflict information document further includes at least one conflict file;
[0220] The acquisition module 1201 is further configured to:
[0221] Get at least one conflict file associated with the target merge conflict;
[0222] Collecting information about the person who modified each of the conflicting files;
[0223] The conflicting files and the information of the modifiers are archived to obtain a conflict information document associated with the target merge conflict.
[0224] In one or more optional embodiments of the present invention, the acquisition module 1201 is further configured to:
[0225] For the conflicting file, obtaining log information of the conflicting file;
[0226] According to the log information, the modification personnel information corresponding to the conflicting file is determined.
[0227] In one or more optional embodiments of the present invention, the acquisition module 1201 is further configured to:
[0228] Get the branch information associated with the target merge conflict;
[0229] According to each branch information, each conflict file associated with the target merge conflict is collected.
[0230] In one or more optional embodiments of the present invention, the acquisition module 1201 is further configured to:
[0231] The branch information, the conflict files and the personnel information are archived to obtain the conflict information document.
[0232] In one or more optional embodiments of the present invention, the processing module 1203 is further configured to:
[0233] A conflict resolution request is sent to the target client, where the conflict resolution request is used to enable a modifier corresponding to the modifier information to modify the conflicting file.
[0234] In one or more optional embodiments of the present invention, the merge conflict handling device 1200 further includes a receiving module, wherein:
[0235] The receiving module is configured to receive a modified file and modification information of the conflicting file, and repair the conflicting file according to the modified file and the modification information;
[0236] The processing module 1203 is further configured to perform conflict processing on the target merge conflict according to the repaired conflict files.
[0237] In one or more optional embodiments of the present invention, the receiving module is further configured to:
[0238] The modified file and / or the modified information of the conflicting file are added to the conflicting information document to form a complete information document, and the complete information document is used for conflict handling testing.
[0239] In one or more optional embodiments of the present invention, the merge conflict handling device 1200 further includes a sending module configured to:
[0240] The branch information corresponding to the modifying personnel information is sent to the target client, and the branch information is used by the target client to obtain the conflicting file.
[0241] Fig.13 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.13As shown, the electronic device may include: a processor 1310, a communication interface 1320, a memory 1330 and a communication bus 1340, wherein the processor 1310, the communication interface 1320 and the memory 1330 communicate with each other through the communication bus 1340. The processor 1310 may call the logic instructions in the memory 1330 to execute a merge conflict handling method, the method comprising: obtaining a conflict information document associated with a target merge conflict, the conflict information document including information of a person who modifies the conflict file; determining a target client based on the information of the person who modifies the conflict file; and processing the conflict file through the target client to resolve the target merge conflict.
[0242] In addition, the logic instructions in the above-mentioned memory 1330 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0243] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the merge conflict processing method provided by the above-mentioned methods, and the method includes: obtaining a conflict information document associated with a target merge conflict, wherein the conflict information document contains information about a person who has modified the conflict file; determining a target client based on the information about a person who has modified the conflict file; and processing the conflict file through the target client to resolve the target merge conflict.
[0244] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the merge conflict processing method provided by the above-mentioned methods, the method comprising: obtaining a conflict information document associated with the target merge conflict, the conflict information document containing the modification personnel information corresponding to the conflict file; determining the target client based on the modification personnel information; processing the conflict file through the target client to resolve the target merge conflict.
[0245] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0246] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0247] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A merge conflict handling method, It is characterized in that include: Obtaining a conflict information document associated with a target merge conflict, wherein the conflict information document includes information about a person who modified the conflicting file; wherein the target merge conflict refers to any merge conflict to be processed; and the merge conflict refers to a conflict or an event that cannot be merged when merging branches; Determine the target client based on the modification personnel information; The target merge conflict is resolved by processing the conflict file through the target client.
2. The merge conflict handling method according to claim 1, It is characterized in that The conflict information document also includes at least one conflict file; The obtaining of the conflict information document associated with the target merge conflict includes: Get at least one conflict file associated with the target merge conflict; Collecting information about the person who modified each of the conflicting files; The conflicting files and the information of the modifiers are archived to obtain a conflict information document associated with the target merge conflict.
3. The merge conflict handling method according to claim 2, It is characterized in that The collecting of the modification personnel information corresponding to each of the conflicting files includes: For the conflicting file, obtaining log information of the conflicting file; According to the log information, the modification personnel information corresponding to the conflicting file is determined.
4. The merge conflict handling method according to claim 2 or 3, It is characterized in that The obtaining of at least one conflict file associated with the target merge conflict includes: Get the branch information associated with the target merge conflict; According to each branch information, each conflict file associated with the target merge conflict is collected.
5. The merge conflict handling method according to claim 4, It is characterized in that The step of archiving the conflicting files and the information of the modifiers to obtain a conflict information document associated with the target merge conflict includes: The branch information, the conflict files and the personnel information are archived to obtain the conflict information document.
6. The merge conflict handling method according to claim 1, It is characterized in that The processing of the conflict file by the target client to resolve the target merge conflict includes: A conflict resolution request is sent to the target client, where the conflict resolution request is used to enable a modifier corresponding to the modifier information to modify the conflicting file.
7. The merge conflict handling method according to any one of claims 1 to 3, It is characterized in that After the target client processes the conflict file to resolve the target merge conflict, the method further includes: Receiving a modified file and modification information of the conflicting file, and repairing the conflicting file according to the modified file and the modification information; The target merge conflict is handled according to the repaired conflict file.
8. The merge conflict handling method according to claim 7, It is characterized in that After receiving the modified file and modification information of the conflicting file, the method further includes: The modified file and / or the modified information of the conflicting file are added to the conflicting information document to form a complete information document, and the complete information document is used for conflict handling testing.
9. The merge conflict handling method according to claim 7, It is characterized in that Before receiving the modified file and modification information of the conflicting file, the method further includes: The branch information corresponding to the modifying personnel information is sent to the target client, and the branch information is used by the target client to obtain the conflicting file.
10. A merge conflict handling device, It is characterized in that include: An acquisition module is configured to acquire a conflict information document associated with a target merge conflict, wherein the conflict information document includes information about a person who modified the conflicting file; wherein the target merge conflict refers to any merge conflict to be processed; and the merge conflict refers to a conflict or an event that cannot be merged when merging branches; A determination module, configured to determine a target client based on the modification personnel information; A processing module is configured to process the conflict file through the target client to resolve the target merge conflict.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the merge conflict handling method according to any one of claims 1 to 9 is implemented.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the merge conflict handling method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the merge conflict handling method according to any one of claims 1 to 9 is implemented.