You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by subhash_m <su...@gmail.com> on 2011/10/20 11:49:01 UTC

Find the changed line numbers in a file

I want to know if there is any way I can find out the line numbers of the
changes made to a file. i.e. numbers of the lines in the modified file where
code is added or edited.

Thanks.
-- 
View this message in context: http://old.nabble.com/Find-the-changed-line-numbers-in-a-file-tp32688385p32688385.html
Sent from the Subversion Users mailing list archive at Nabble.com.


Re: Find the changed line numbers in a file

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Then install diffstat.exe and repeat what Stefan said :)

It's probably in the diffutils or diffstat package on gnuwin32.sf.net or
a similar place.

subhash_m wrote on Thu, Oct 20, 2011 at 03:56:41 -0700:
> 
> Thanks for diffstat suggestion. But I am on Windows. :(
> 
> 
> Stefan Sperling-7 wrote:
> > 
> > On Thu, Oct 20, 2011 at 03:24:55AM -0700, subhash_m wrote:
> >> 
> >> Hi Mark,
> >> I want to do this from a script. Basically script should find out numbers
> >> of
> >> the lines changed in the file. 
> > 
> > Install diffstat, and run 'svn diff -cN | diffstat'.
> > 
> > Example:
> > $ svn diff -c1186167 https://svn.apache.org/repos/asf | diffstat
> >  1.7.x/STATUS                                      |   11 ----
> >  1.7.x/subversion/libsvn_client/mergeinfo.c        |   51
> > ++++++++++++++++++--
> >  1.7.x/subversion/tests/cmdline/mergeinfo_tests.py |   56
> > ++++++++++++++++++++++
> >  3 files changed, 103 insertions(+), 15 deletions(-)
> > 
> > 
> 
> -- 
> View this message in context: http://old.nabble.com/Find-the-changed-line-numbers-in-a-file-tp32688385p32688730.html
> Sent from the Subversion Users mailing list archive at Nabble.com.
> 

Re: Find the changed line numbers in a file

Posted by subhash_m <su...@gmail.com>.
Thanks for diffstat suggestion. But I am on Windows. :(


Stefan Sperling-7 wrote:
> 
> On Thu, Oct 20, 2011 at 03:24:55AM -0700, subhash_m wrote:
>> 
>> Hi Mark,
>> I want to do this from a script. Basically script should find out numbers
>> of
>> the lines changed in the file. 
> 
> Install diffstat, and run 'svn diff -cN | diffstat'.
> 
> Example:
> $ svn diff -c1186167 https://svn.apache.org/repos/asf | diffstat
>  1.7.x/STATUS                                      |   11 ----
>  1.7.x/subversion/libsvn_client/mergeinfo.c        |   51
> ++++++++++++++++++--
>  1.7.x/subversion/tests/cmdline/mergeinfo_tests.py |   56
> ++++++++++++++++++++++
>  3 files changed, 103 insertions(+), 15 deletions(-)
> 
> 

-- 
View this message in context: http://old.nabble.com/Find-the-changed-line-numbers-in-a-file-tp32688385p32688730.html
Sent from the Subversion Users mailing list archive at Nabble.com.


Re: Find the changed line numbers in a file

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Oct 20, 2011 at 03:24:55AM -0700, subhash_m wrote:
> 
> Hi Mark,
> I want to do this from a script. Basically script should find out numbers of
> the lines changed in the file. 

Install diffstat, and run 'svn diff -cN | diffstat'.

Example:
$ svn diff -c1186167 https://svn.apache.org/repos/asf | diffstat
 1.7.x/STATUS                                      |   11 ----
 1.7.x/subversion/libsvn_client/mergeinfo.c        |   51 ++++++++++++++++++--
 1.7.x/subversion/tests/cmdline/mergeinfo_tests.py |   56 ++++++++++++++++++++++
 3 files changed, 103 insertions(+), 15 deletions(-)

RE: Find the changed line numbers in a file

Posted by subhash_m <su...@gmail.com>.
Hi Mark,
I want to do this from a script. Basically script should find out numbers of
the lines changed in the file. 

Thanks.


Cooke, Mark wrote:
> 
>> -----Original Message-----
>> From: subhash_m [mailto:subhashsubhash@gmail.com] 
>> Sent: 20 October 2011 10:49
>> To: users@subversion.apache.org
>> Subject: Find the changed line numbers in a file
>> 
>> 
>> I want to know if there is any way I can find out the line 
>> numbers of the
>> changes made to a file. i.e. numbers of the lines in the 
>> modified file where
>> code is added or edited.
>> 
>> Thanks.
> 
> It is not clear what you want, do you want to do this from a script or
> just look at the file?
> 
> The 'blame' command will show a file and the version at which each line
> was changed morst recently and by whom:
> 
> http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.blame.html
> 
> ~ mark c
> 
> 

-- 
View this message in context: http://old.nabble.com/Find-the-changed-line-numbers-in-a-file-tp32688385p32688585.html
Sent from the Subversion Users mailing list archive at Nabble.com.


RE: Find the changed line numbers in a file

Posted by "Cooke, Mark" <ma...@siemens.com>.
> -----Original Message-----
> From: subhash_m [mailto:subhashsubhash@gmail.com] 
> Sent: 20 October 2011 10:49
> To: users@subversion.apache.org
> Subject: Find the changed line numbers in a file
> 
> 
> I want to know if there is any way I can find out the line 
> numbers of the
> changes made to a file. i.e. numbers of the lines in the 
> modified file where
> code is added or edited.
> 
> Thanks.

It is not clear what you want, do you want to do this from a script or just look at the file?

The 'blame' command will show a file and the version at which each line was changed morst recently and by whom:

http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.blame.html

~ mark c