SVN – List Modified Files Between Revisions

Few months ago, I took note about how to list modified files between revisions in GIT. Just today, I needed an SVN version for that and it just took me a few seconds to find it on the net, thanks to StackOverflow.

According to the answers in StackOverflow, here are some ways to list modified files between revisions in SVN – of course in the command line.

Summarize

I like this one. Using svn diff with the --summarize option does a good job. It looks like this: (be sure you are on a checkout directory or you need to supply the SVN project url at the end)

svn diff --summarize -r717:726

And the possible output looks like this:

M       application/models/Employee.php
M       application/models/LotNumber.php
M       application/controllers/Xxx19CheckController.php
M       application/controllers/EmployeeController.php
A       application/controllers/ProductionCheckController.php
M       application/configs/xxx_app.ini
M       application/views/scripts/employee/index.phtml
M       application/views/scripts/production-check/index.phtml
M       application/views/scripts/menu/index.phtml
M       application/views/scripts/xxx19-check/index.phtml
A       public/css/production-check.css
M       public/js/menu_form.js
A       public/js/production-check.js

Using Log

Another answer posted was using the svn log route.

svn log -r717:726 -q -v | grep "   M" | sort -u

It involves a lot of piping output but works nevertheless. I’m not sure how it performs on a Windows environment which don’t have grep and I’m not even sure that sort also exists. Here is the possible output.

   M /application/configs/xxx_app.ini
   M /application/controllers/EmployeeController.php
   M /application/controllers/Xxx19CheckController.php
   M /application/forms/MenuForm.php
   M /application/models/Employee.php
   M /application/models/LotNumber.php
   M /application/views/scripts/employee/index.phtml
   M /application/views/scripts/menu/index.phtml
   M /application/views/scripts/production-check/index.phtml
   M /application/views/scripts/xxx19-check/index.phtml
   M /library/Xxx/Auth.php
   M /public/js/menu_form.js
   M /public/js/production-check.js

As you can see, /library/Xxx.Auth.php was not actually modified from revision 717 when compared to 726. However, in between revisions, there are revisions to this file such as debugging that were removed when the new feature was complete. Therefore we conclude that svn diff --summarize is better if you only want to know what files are changed and don’t want to know the details in between revisions.

This entry was posted in SVN and tagged , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *