How do you get the history of a file/folder property in SVN?

mr. w picture mr. w · Aug 5, 2009 · Viewed 10.9k times · Source

What's the easiest way to determine when a property was set on a file or folder? Basically, I'm looking for an equivalent of "svn blame" that works on properties.

The log subcommand enables one to get the complete history of a file or folder, including when the properties have been modified. However, it doesn't distinguish between a property modification and other types of modification, which of course also means that it won't tell you anything about the history of a particular property.

The status command differentiates between properties and other types of modifications, but only works on the working copy.

Blame, itself, only supports files, not directories, and it works on the content, not the properties.

Ideas?

Answer

Don Kirkby picture Don Kirkby · Aug 5, 2009

The best I can think of is to write a little script or app that uses the svn propget command to dump the current property value to a text file, and then walks back through the revisions dumping the property to another text file and comparing the two. As soon as it detects a change, it prints out the revision number (actually the later revision number that made the change) along with the user who committed it.

Here's an example command to dump the svn:ignore property for the dictionary directory at revision 80:

svn propget -r 80 svn:ignore dictionary