Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a metadata exclusion filter for the SVN DIFF command?

You can pass the svn diff output through 'filterdiff --clean' to remove any extraneous lines including property changes.


If you use the --summarize option, then property changes are indicated in the second rather than the first column.

I.e.,

M  URL  -- indicates content change
 M URL  -- property change
MM URL  -- content and property change

It is a bit easier to grep. I guess you could have a two-stage process if you want a full diff - first use summarize to find files with content change, then diff them.


Found this while searching through the svn help docs

svn diff --patch-compatible

It's the same as running

svn diff --show-copies-as-adds --ignore-properties

Nice tip from JosephWatkins.

Here is the command for the grep-junior-users:

svn diff A B --summarize | grep '^. '

The grep looks for a space as the second character on the line.


There seems to be no way to get this done using the svn built-in tools. How I solved it: Export both trees and diff them diretly on the filesystem using your favourite diff tool. That's somehow the only way to get this done :/


Use svn diff --ignore-properties. That's Subversion's built-in method to do differencing of the content only. It ignores any changes to the properties of the items.