Is there any description of a diff/patch format visualization algorithm? 开发者_C百科(or maybe it is too trivial to be described)
The Rietveld code review tool has a lot of comments explaining its operation in its source code. Take particular notice of intra_regiion_diff.py and engine.py.
What diff tools produce as data is pretty basic: "this line changed that way".
"Visualizing" that normally consists of showing the original code and the modified code side by side, with the "this line changed" indicated by marking the display text somehow. Basically this means scrollable text windows with painted stripes of text. Fancy versions will paint lines between the changed line in one window, and it corresponding line in another.
精彩评论