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

Re: cvs log equivalent

From: Paul Graham <pgraham_at_oasys-ds.com>
Date: Fri, 25 Mar 2011 12:35:46 -0700 (PDT)

The "Lines" field of svn log is puzzling. It says how many lines of comment, etc., follow the header line. It is therefore about as informative as "this page intentionally left blank". Yet in its location in the log message it resembles the cvs "lines-changed" field enough to be misleading.

Paul
----- Original Message -----
From: "Johan Corveleyn" <jcorvel_at_gmail.com>
To: "Daniel Shahaf" <d.s_at_daniel.shahaf.name>
Cc: "Paul Graham" <pgraham_at_oasys-ds.com>, users_at_subversion.apache.org
Sent: Friday, March 25, 2011 3:24:22 PM
Subject: Re: cvs log equivalent

On Fri, Mar 25, 2011 at 7:34 PM, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> Johan Corveleyn wrote on Sat, Mar 19, 2011 at 14:50:30 +0100:
>> On Sat, Mar 19, 2011 at 2:21 AM, Hyrum K. Wright
>> <hyrum_wright_at_mail.utexas.edu> wrote:
>> > On Fri, Mar 18, 2011 at 6:13 PM, Paul Graham <pgraham_at_oasys-ds.com> wrote:
>> >> I could find all the change versions of a file, then do an svn diff for each change, then parse the output and determine the number of changes, but that seems excessive :-)
>> >>
>> >> rcs has this lines+/- information directly in the database.  Is svn organized differently under the hood?
>> >
>> > Significantly.
>> >
>> > One thing I usually do is run svn diff on the revision of interest and
>> > then pipe that through diffstat:
>> >
>> > $ svn diff -c1089374 | diffstat
>> >
>> > That will usually yield sufficiently interesting result for my application.
>>
>> Paul,
>>
>> It may interest you to know that the upcoming 1.7 release of svn will
>> have a '--diff' option for 'svn log', which will show the diffs inline
>> with the log output. You may be able to script something around that,
>> post-processing the output of 'svn log --diff' by sending each diff to
>> 'diffstat', and replacing the diff output with the diffstat output or
>> something (this will be much more efficient than executing 'svn diff
>> -c XXX | diffstat' for every revision that's being output by log).
>
> I think you mean:
>
>  svn log --diff --diff-cmd=/path/to/wrapper-script-around-diffstat

Ohhh, I hadn't thought of that. That certainly seems like a nice way
to do this ...

Cheers,

-- 
Johan
Received on 2011-03-25 20:36:18 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.