Skip to main content
Enterprise Agile Planning Image

This post is from the CollabNet VersionOne blog and has not been updated since the original publish date.

Last Updated Mar 15, 2007 — Enterprise Agile Planning expert

Computing the differences between tags

Enterprise Agile Planning

A very common question asked on the Subversion mailing list is “How can I see the differences between two tags?” Of course there are a lot of variants of this question such as what are the differences between trunk and a branch or two branches etc. The person asking this question is almost always aware that they can run the svn diff command to get the differences, but usually they just want to know the list of differences at the file name level, not the complete line-level diff. Prior to Subversion 1.4, the answer to this question was usually that you had to parse the diff output and extract the file names.

With Subversion 1.4, however, a new option, –summarize, has been added to the diff command.  When this option is provided, the diff command just outputs the differences at the file level.  For example, to see the differences between the Subversion 1.3.1 and 1.3.2 tags I can run this command:

svn diff --summarize http://svn.collab.net/repos/svn/tags/1.3.1 http://svn.collab.net/repos/svn/tags/1.3.2
M      http://svn.collab.net/repos/svn/tags/1.3.1/STATUS
M      http://svn.collab.net/repos/svn/tags/1.3.1/build.conf
M      http://svn.collab.net/repos/svn/tags/1.3.1/configure.in
M      http://svn.collab.net/repos/svn/tags/1.3.1/build/ac-macros/aprutil.m4
M      http://svn.collab.net/repos/svn/tags/1.3.1/build/ac-macros/apr.m4
M      http://svn.collab.net/repos/svn/tags/1.3.1/build/ac-macros/swig.m4
M      http://svn.collab.net/repos/svn/tags/1.3.1/build/get-py-info.py
M      http://svn.collab.net/repos/svn/tags/1.3.1/build/generator/swig/external_runtime.py
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/include/svn_version.h
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/libsvn_wc/status.c
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/libsvn_wc/lock.c
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/bindings/swig/INSTALL
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/bindings/swig/NOTES
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/mod_dav_svn/version.c
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/mod_dav_svn/repos.c
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/tests/clients/cmdline/stat_tests.py
A      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/tests/clients/cmdline/authz_tests.py
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/tests/clients/cmdline/svntest/actions.py
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/tests/clients/cmdline/svntest/main.py
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/tests/libsvn_repos/repos-test.c
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/libsvn_repos/commit.c
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/svnserve/serve.c
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/po/ja.po
M      http://svn.collab.net/repos/svn/tags/1.3.1/subversion/po/zh_TW.po
M      http://svn.collab.net/repos/svn/tags/1.3.1/contrib/client-side/svn_load_dirs.pl.in
M      http://svn.collab.net/repos/svn/tags/1.3.1/tools/hook-scripts/mailer/mailer.py
A      http://svn.collab.net/repos/svn/tags/1.3.1/tools/server-side/svnauthz-validate.c
A      http://svn.collab.net/repos/svn/tags/1.3.1/tools/server-side
M      http://svn.collab.net/repos/svn/tags/1.3.1/CHANGES
M      http://svn.collab.net/repos/svn/tags/1.3.1/packages/rpm/rhel-3/apr.patch
M      http://svn.collab.net/repos/svn/tags/1.3.1/packages/rpm/rhel-4/apr.patch
 M     http://svn.collab.net/repos/svn/tags/1.3.1

With the –summarize option provided to the diff command, the output shows the changes at the file level. The output is similar to what you would see with many of the other Subversion commands. The first column has a value to indicate if the file was Added, Modified, Deleted, the second column does the same for properties.  This makes it easy to parse the output in scripts. The –summarize option was a great enhancement to the diff command and solves this use case really well.

More from the Blog

View more
Apr 08, 2021

Making IT services more agile

Enterprise Agile Planning
The agile revolution completely transformed how we create digital prod ...
Read More
Feb 14, 2021

Reflecting on the 20th anniversary of the Agile Manifesto

Enterprise Agile Planning
Over the past 20 years, it’s been amazing to watch an idea from ...
Read More
Feb 08, 2021

How does agile apply to an entire organization?

Enterprise Agile Planning
Before we dive into the main subject of this blog post, it is importan ...
Read More
Feb 03, 2021

It took a pandemic to realize why digital transformation actually matters

Enterprise Agile Planning
Before anyone had ever heard of COVID-19, businesses across the globe ...
Read More
Contact Us