Improved Subversion Property Searching in Subversion 1.8

Subversion 1.8 has a new feature that makes for improved property searching. This feature has several possible applications, including the ability to dictate some configuration centrally, but I’ll focus on a custom workflow example.

First, what’s the new feature? Subversion 1.8 now lets you ask for the value of a property and see the value for a particular element and its ancestors. For example, let’s say that I use a custom property called quality to store a quality metric from an automated review tool. The tool normally stores the property on directories holding major components, but occasionally stores the property on lower level directories or even single files if it identifies a quality hot spot.

Normally propget only shows me the value on a single element:

> svn propget quality libs/audio/codec/
red: 42/100

The new –show-inherited-props option will show me the value for that element, plus all of the parent directories:

> svn propget -v --show-inherited-props quality libs/audio/codec/
Inherited properties on 'libs/audio/codec/',
from 'libs':
Inherited properties on 'libs/audio/codec/',
from 'libs/audio':
Inherited properties on 'libs/audio/codec/',
from 'libs/audio/codec':
Properties on 'libs/audio/codec/':
   red: 42/100

Now it’s easy for me to see quality metrics at whatever granularity I’d like – and in this example I can see the metrics all the way up from a single file to the component level.

Inherited properties can also be used to centrally manage some configuration variables, like defining MIME types via auto-props. Paul Burba has a good sequence of articles describing these use cases in more detail, as well as some of the nuances of inherited properties.

If you’d like to try inherited properties, grab a certified SVN 1.8 binary from WANdisco.

Subversion is a registered trademark of the Apache Software Foundation.

0 Responses to “Improved Subversion Property Searching in Subversion 1.8”

  • No Comments

Leave a Reply