I did an svn blame
on a file like
$ svn blame folder1/file.txt
It gives me the otput that looks like:
svnRevision userName line
How do I make it to print the line number as well?, something like
lineNumber svnRevision userName line
If you want to see blame-annotated source for readme. txt in your test repository: $ svn blame http://svn.red-bean.com/repos/test/readme.txt 3 sally This is a README file.
Subversion has a command for this, and it is called blame (guess why). Subversion creates a blame of a file by adding information about the author who committed a line, the revision the line was last changed and the date. TortoiseSVN has its own tool to show you those blames.
svn blame (praise, annotate, ann) — Show author and revision information inline for the specified files or URLs.
Based on Kunal Cholera, but without creating any files
svn blame file.cpp | cat -n
you can do that:
svn blame file.cpp | nl
You can get line numbers by outputting the result in XML
svn blame --xml <file>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With