Friday 1 December 2006 — This is 18 years old. Be careful.
Here’s a thing I miss about Perforce from Subversion, and I hope there’s a way I can still do it. Both systems have an annotate command, that shows for each line in the file what revision last touched it. It’s a great way to figure out how your code got to be the way it is.
But the Perforce annotate command offers the -a switch. This means show all revisions of all lines. So for example, if a certain line changed three times over the lifetime of the file, all three lines would appear in the annotated output, with the range of revisions that each was current. It’s a great tool for figuring out when some baffling change was introduced, so you can go back, read the checkin comment, get your head into the mindset of the time, and forensically understand the history of the code.
Is there a Subversion tool that can do this?
Comments
Ned: I don't know of any way to do it. Clearly, one could be written using the subversion API. It would, however, be horribly slow. That may be acceptable: after all, ANALYZING such a file would be horribly slow also! Frankly, I'm surprised you find it so useful, but perhaps that's just because I haven't ever tried it.
I don't quite understand what the output of the -a command looks like - could you show some sample output?
Ay, there's the revision."
http://stackoverflow.com/questions/282802/how-can-i-view-all-historical-changes-to-a-file-in-svn
Add a comment: