[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn diff line numbers

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 04 Jan 2019 14:26:34 +0000

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
Received on 2019-01-04 15:26:45 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.