svn diff line numbers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

svn diff line numbers

abirami_n
Hi,

I am using svn diff command to get the diff between two files from
subversion.

I get the chunk header for the changed chunk.

But I am not finding any option to print line numbers.

Is it possible to get individual line numbers for all the changed lines?



--
Sent from: http://subversion.1072662.n5.nabble.com/Subversion-Users-f84423.html
Reply | Threaded
Open this post in threaded view
|

Re: svn diff line numbers

Daniel Shahaf-2
abirami_n wrote on Wed, 02 Jan 2019 02:06 -0700:

> Hi,
>
> I am using svn diff command to get the diff between two files from
> subversion.
>
> I get the chunk header for the changed chunk.
>
> But I am not finding any option to print line numbers.
>
> Is it possible to get individual line numbers for all the changed lines?

The hunk (sic) header already includes that information: in "-a,b +c,d",
A and C are line numbers.  The output is in the standard unidiff format,
so if you want to add line numbers to every line, just pipe 'svn diff''s
output to any unidiff-aware program that shows or adds line numbers.
(I'm not aware of any off the top of my head, but it would be trivial to
write one.)

Cheers,

Daniel