ANN/RFC: extension that shows evolution of a range of lines in a file
peter.arrenbrecht at gmail.com
Fri Apr 16 00:53:46 CDT 2010
On Fri, Apr 16, 2010 at 3:50 AM, Benjamin Pollack
<benjamin at bitquabit.com> wrote:
> On Apr 15, 2010, at 5:04 AM, Adrian Buehlmann wrote:
>>> I'd also point out that Kiln has a very similar feature already: when viewing a file or diff, if you click the disclosure triangle next to the line you're interested in, it will show you the history of that line back in time, tracking its movement around the file. It's not perfect, but it ends up working pretty well most of the time. The logic's quite similar to your patch, though simpler, since we're only doing one line, not a range.
> While the system works okay, I'm not totally happy with it. On the one hand, Peter's algorithm generates better output. On the other hand, tracking a single line back in time lets you take full advantage of caching--which was, indeed, part of the benefit reaped from Anton Markov's excellent annotation cache extension , which helped make this feature feasible for Kiln On Demand. I still personally think that the really right thing to do is to kind of do an "annotation" of ctags/etags files, but that's fairly hard to do right. OpenGrok is the closest I know to a good implementation, and while it's awesome, it still gets a lot of things wrong.
Note that my algorithm seems to break down when your history contains,
for example, wholesale code reformatting or a switch from CRLF to LF
or some such.
More information about the Mercurial