‘svn log’ shows the log of:
1) files whose content has changed
AND/OR
2) files whose properties have changed.
Is there a way to show only files for which case 1 applies?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As you know, svn log’s output is organized by commit log messages rather than by files. If you use verbose mode (-v), it will show the files (“paths”) associated with each log entry.
However some of those paths can be outside of the requested target (default: your current directory). Do you want the results to include those external paths as well?
I guess taking your question at face value, you’re just asking for filtering, so yes you would want those external paths if they represent a content change to files.
Here is a solution. It may be slow, but I tested it and it works in cygwin on Windows 7.
(Don’t forget, make sure your scripts have unixy line endings! with dos2unix if necessary)
It’s really only one long line, except for an external sed script (which a real hacker could put on the command line but life is short to be messing with command-line escaping):
Here is the external sed script. Be sure to change the svn repository base URL to the right base URL for your repository. I.e. the beginning part of the svn URL that is not output by svn log -v.
The script will output some error messages to error.log, primarily “path not found”, which I believe is for files that used to be present in the repository but have been moved (renamed) or deleted.
Does this meet your requirements?
Credit to Michael Augustin at this page for ideas about grepping the output of svn diff to remove property-only changes.
P.S. This other page seems to ask the same question, but there’s no full answer there.
P.P.S. Edited the above bash script to add an extra
| sort | uniqto the end of the pipeline, since I have seen duplicates come out there. Though I don’t see why they would occur.