Revision control system using delta script of syntax tree. - Hayase, Yasuhiro (Software engineering notes.)
In an opensource development process developers work together using a revision control system. While getting multi-developers working products together into a single form, merge feature of revision control systems is used. Nowadays, merge operations in existing systems are commonly implemented with a line-by-line approach that can fail if two changes to the same line of code happen at the same time.In this paper, we propose a two-way merge algorithm for source code that exploit the tree structure of modern programming language grammar: the source code is transformed in an intermediate XML representation and the merge operation is conducted on the transformed version.We give an implementation of the algorithm for the Java language for the subversion revision control system.Experiments shown that the proposed algorithm gives more accurate merge result than the existing line-by-line algorithms.