Svn annotate all?

Friday 1 December 2006This is over 16 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?


`svn blame` come close... it shows you who/revision is responsible for each line. Not exactly what you're looking for, but a start.
Michael Chermside 11:08 AM on 1 Dec 2006
Pete: 'svn blame' is just another name for 'svn annotate'. Both show only the latest revision of each line.

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.
Subversion has a well-maintained python API, so I imagine it wouldn't be too hard to write.

I don't quite understand what the output of the -a command looks like - could you show some sample output?
I think Shakespeare said, "To annotate, Perforce to change --
Ay, there's the revision."
this link might help and give you much closer to perforce -a switch with subversion :

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.