cvs log equivalent
SVN experts: The cvs log command includes information about the size of each change: revision 1.14 date: 2010-03-13 18:26:55 -0500; author: pgraham; state: Exp; lines: +331 -288; Rewrote function. revision 1.13 date: 2010-03-04 22:17:56 -0500; author: pgraham; state: Exp; lines: +4 -3; Minor cleanup. It's useful to see when a major change was made to a file. The svn log command lists only log messages, with no information about the magnitude of each change. In fact, I was confused for a while by the svn log output format. It is somewhat similar to the cvs log file output, but the "lines" field is only the number of lines in the log message. It has nothing to do with the actual change made to the file: r7327 | pgraham | 2008-03-07 19:33:42 -0500 (Fri, 07 Mar 2008) | 2 lines Check for null pointer. r7143 | pgraham | 2008-02-07 20:55:01 -0500 (Thu, 07 Feb 2008) | 2 lines Completely rewrite module. Is there any way to get an output similar to cvs log? Paul
Re: cvs log equivalent
Andy, Thanks for the reply, but svn log --verbose does not do what I asked about. What I'm interested in is something like cvs log which shows the number of lines affected by the change, e.g., "lines: +10 -5". Paul - Original Message - From: "Andy Levy" To: "Paul Graham" Cc: users@subversion.apache.org Sent: Friday, March 18, 2011 2:20:23 PM Subject: Re: cvs log equivalent On Fri, Mar 18, 2011 at 09:39, Paul Graham wrote: > SVN experts: > > The cvs log command includes information about the size of each change: > > revision 1.14 > date: 2010-03-13 18:26:55 -0500; author: pgraham; state: Exp; lines: +331 > -288; > Rewrote function. > > revision 1.13 > date: 2010-03-04 22:17:56 -0500; author: pgraham; state: Exp; lines: +4 -3; > Minor cleanup. > > It's useful to see when a major change was made to a file. > > The svn log command lists only log messages, with no information about the > magnitude of each change. In fact, I was confused for a while by the svn log > output format. It is somewhat similar to the cvs log file output, but the > "lines" field is only the number of lines in the log message. It has nothing > to do with the actual change made to the file: > > > r7327 | pgraham | 2008-03-07 19:33:42 -0500 (Fri, 07 Mar 2008) | 2 lines > > Check for null pointer. > > > r7143 | pgraham | 2008-02-07 20:55:01 -0500 (Thu, 07 Feb 2008) | 2 lines > > Completely rewrite module. > > > Is there any way to get an output similar to cvs log? Try svn log --verbose Always look to svn help first when you have a question about how a command works. The help provided by Subversion is pretty good.
Re: cvs log equivalent
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? Paul - Original Message - From: "Ryan Schmidt" To: "Paul Graham" Cc: users@subversion.apache.org Sent: Friday, March 18, 2011 6:41:50 PM Subject: Re: cvs log equivalent On Mar 18, 2011, at 08:39, Paul Graham wrote: > The cvs log command includes information about the size of each change: > Is there any way to get an output similar to cvs log? Not with the standard client, no. Perhaps such a thing could be written with a custom script.
Re: cvs log equivalent
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" To: "Daniel Shahaf" Cc: "Paul Graham" , users@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 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 >> wrote: >> > On Fri, Mar 18, 2011 at 6:13 PM, Paul Graham 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