Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print line number with svn blame?

Tags:

svn

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 
like image 929
kay am see Avatar asked Mar 06 '12 22:03

kay am see


People also ask

How to check svn blame?

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.

How does svn blame work?

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.

What does svn praise do?

svn blame (praise, annotate, ann) — Show author and revision information inline for the specified files or URLs.


3 Answers

Based on Kunal Cholera, but without creating any files

svn blame file.cpp | cat -n
like image 103
Pelle Avatar answered Oct 19 '22 04:10

Pelle


you can do that:

svn blame file.cpp | nl
like image 24
zcsunt Avatar answered Oct 19 '22 04:10

zcsunt


You can get line numbers by outputting the result in XML

svn blame --xml <file>
like image 2
Adam Prax Avatar answered Oct 19 '22 02:10

Adam Prax