Cross version line matching.
Posted
by BCS
on Stack Overflow
See other posts from Stack Overflow
or by BCS
Published on 2010-04-09T16:19:14Z
Indexed on
2010/04/18
6:33 UTC
Read the original article
Hit count: 143
I'm considering how to do automatic bug tracking and as part of that I'm wondering what is available to match source code line numbers (or more accurate numbers mapped from instruction pointers via something like addr2line
) in one version of a program to the same line in another. (Assume everything is in some kind of source control and is available to my code)
The simplest approach would be to use a diff tool/lib on the files and do some math on the line number spans, however this has some limitations:
- It doesn't handle cross file motion.
- It might not play well with lines that get changed
- It doesn't look at the information available in the intermediate versions.
- It provides no way to manually patch up lines when the diff tool gets things wrong.
- It's kinda clunky
Before I start diving into developing something better:
- What already exists to do this?
- What features do similar system have that I've not thought of?
© Stack Overflow or respective owner