本文已被:浏览 2024次 下载 5865次
Received:June 24, 2014 Revised:August 11, 2014
Received:June 24, 2014 Revised:August 11, 2014
中文摘要: 在软件开发中, 并行开发已经成为了现实中标准的开发模式, 因此软件开发的版本控制在开发过程中得到了非常广泛的应用. 虽然大多数的版本控制工具都能完成分支合并以及将不同版本的更改合并起来, 但这些工具往往是以一行一行的代码为单位进行文本比较的合并, 在遇到某行被同时修改时, 则不能给出满意的合并结果. 给出了一种新的合并算法, 用来解决文本比较分支合并中的问题, 它在传统工具的文本比较出现冲突的代码行, 对该代码块建立抽象语法树, 根据抽象语法树的分析比较, 完成不同分支版本代码的自动合并, 减少分支合并中的代码冲突及手动合并的工作量, 提高开发效率.
Abstract:Software Development, where developers work together parallelly is the standard develop mode actually, needs the revision control tool to assistance the development widely. Most of the tools today could merge the code changes from different branches edited by different developers. These tools are based on code text differ comparation line by line, and the merged code isn't always the prediction of the developers. This paper presents a new branch merging algorithm which intends to provide a better result. We build an abstract syntax tree of the code block where the traditional merge gives a code confliction. Then we merge this code block of different revisions automately based on AST nodes comparative analysis. In this way, the code conflictions and manual work in branch merging could be reduced. At the same time, the development efficiency would be improved.
keywords: revision control AST branch merging
文章编号: 中图分类号: 文献标志码:
基金项目:
引用文本:
李郑,李姝,王俊,刘士进.基于抽象语法树分析的版本控制分支合并算法.计算机系统应用,2015,24(3):139-146
LI Zheng,LI Shu,WANG Jun,LIU Shi-Jin.Revision Control Branch Merging Algorithm Based on AST.COMPUTER SYSTEMS APPLICATIONS,2015,24(3):139-146
李郑,李姝,王俊,刘士进.基于抽象语法树分析的版本控制分支合并算法.计算机系统应用,2015,24(3):139-146
LI Zheng,LI Shu,WANG Jun,LIU Shi-Jin.Revision Control Branch Merging Algorithm Based on AST.COMPUTER SYSTEMS APPLICATIONS,2015,24(3):139-146

