首页 | 本学科首页   官方微博 | 高级检索  
     

基于抽象语法树分析的版本控制分支合并算法
引用本文:李郑,李姝,王俊,刘士进.基于抽象语法树分析的版本控制分支合并算法[J].计算机系统应用,2015,24(3):139-146.
作者姓名:李郑  李姝  王俊  刘士进
作者单位:1. 国网电力科学研究院,南京,211100
2. 国网上海市电力公司信息通信公司,上海,200000
摘    要:在软件开发中,并行开发已经成为了现实中标准的开发模式,因此软件开发的版本控制在开发过程中得到了非常广泛的应用.虽然大多数的版本控制工具都能完成分支合并以及将不同版本的更改合并起来,但这些工具往往是以一行一行的代码为单位进行文本比较的合并,在遇到某行被同时修改时,则不能给出满意的合并结果.给出了一种新的合并算法,用来解决文本比较分支合并中的问题,它在传统工具的文本比较出现冲突的代码行,对该代码块建立抽象语法树,根据抽象语法树的分析比较,完成不同分支版本代码的自动合并,减少分支合并中的代码冲突及手动合并的工作量,提高开发效率.

关 键 词:抽象语法树  版本控制  分支合并
收稿时间:2014/6/24 0:00:00
修稿时间:2014/8/11 0:00:00

Revision Control Branch Merging Algorithm Based on AST
LI Zheng,LI Shu,WANG Jun and LIU Shi-Jin.Revision Control Branch Merging Algorithm Based on AST[J].Computer Systems& Applications,2015,24(3):139-146.
Authors:LI Zheng  LI Shu  WANG Jun and LIU Shi-Jin
Affiliation:State Grid Electric Power Research Institute, Nanjing 210003, China;State Grid Information and Communications Co of Shanghai Electric Power Co. Ltd, Shanghai 200000, China;State Grid Electric Power Research Institute, Nanjing 210003, China;State Grid Electric Power Research Institute, Nanjing 210003, China
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
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《计算机系统应用》浏览原始摘要信息
点击此处可从《计算机系统应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号