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

Re: How to print out only the most recent log message for each file in a project?

From: Quinn Taylor <quinntaylor_at_mac.com>
Date: Fri, 5 Sep 2008 21:52:57 -0600

>> If I do 'svn log HEAD', I only get the log message for the most
>> recent
>> commit. I'd like something like an option to 'svn status' that
>> prints log
>> messages, but it doesn't seem to exist. Is it possible to do what I
>> want?
>
> Revisions are global to the repository, not unique to each file. So,
> to get the log message associated with the revision where each file
> was last changed, you'll need to script:
>
> For each file, run svn info
> Parse the output to get the last changed rev
> Run svn log -r <rev> <filename>
>
> Or something close to that.

Something close to what you want it possible. Printing the log
statements for individual files and directories is likely to be nigh
unto unintelligible. However, `svn list --verbose URL` will print the
last revision, last modifier, modify date, and path for every node at
the specified URL. This is certainly much easier than scripting a
solution and dealing with the network latency and extra parsing.

That said, it might be nice to have finer control over what is
printed, but the predictable structure of --verbose is easy enough to
handle, and there are many more important fish to fry.

If you really want the log messages, I'd recommend getting the verbose
list, creating a non-repeating set of revision numbers, then running
`svn log --revision REV` for each revision. Or use something like
WebSVN or ViewVC to browse to the revisions of interest. :-)

  - Quinn

  • application/pkcs7-signature attachment: smime.p7s
Received on 2008-09-06 05:53:38 CEST

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.