Skip to main content
Enterprise Agile Planning icon with arrows

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

Last Updated Jun 26, 2013 — Enterprise Agile Planning expert

Repository Dictated Configuration — Part 3 of 3: Global Ignores

Enterprise Agile Planning

Global Ignores

Welcome to the last topic in my three part series on repository dictated configuration (RDC).  In part 2 we talked about the new svn:auto-props property.  Today we’ll discuss the other new inherited property that involves RDC, svn:global-ignores.

Ignoring Unversioned Items Before 1.8

Once again, this is just a quick refresher, if none of this sounds familiar, then give this section of the Version Control with Subversion book a quick read.

Up until 1.7 there were two ways to prevent the svn add and import subcommands from adding certain items we didn’t want to place under version control (as well as making svn status ignore such unversioned items).  Both of these methods still exist in 1.8:

First, is the global-ignores runtime configuration option:

### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'.
global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__ *.rej *~ #*# .#* .*.swp .DS_Store

Second is the svn:ignore versioned property.  This property, which can be set on any directory, has a value which is expected to be a newline-delimited list of file patterns that Subversion should ignore.  These patterns are appended to any ignore patterns defined in the runtime configuration.

The svn:global-ignores Property

In Subversion 1.8, these existing ignore mechanisms are joined by the svn:global-ignores property.  This new property is essentially a more powerful version of the svn:ignore property.  Like the earlier property, svn:global-ignores can only be set on a directory and should have as a value a set of newline delimited file patterns 1.  These patterns are appended to any patterns defined in the global-ignores runtime configuration option together with any applicable svn:ignore defined patterns, to determine ignorable items. Unlike svn:ignore however, the svn:global-ignores property is inheritable and applies to all paths under the directory on which the property is set 2, not just the immediate children of the directory.

The following short example demonstrates how this new property works.

The svn:global-ignores patterns are themselves ignored (as are the runtime config global-ignores and the svn:ignore property) when the --no-ignore option is used.  So to see all unversioned items in our working copy, we pass that option to the status subcommand:

1.8.0>svn st --no-ignore
?       calc\trunk\doc\
I       calc\trunk\
I       calc\trunk\file.baz
I       calc\trunk\
I       calc\trunk\file.qux

Here we see that four files are being ignored, while one ( is unversioned by doesn’t match any ignore patterns.  First, let’s look at the svn:ignore property on calc/trunk:

1.8.0>svn pg svn:ignore -vR
Properties on 'calc\trunk':

That accounts for  Then we check our runtime configuration and find this snippet:

### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'.
global-ignores = *.qux

That accounts for file.qux.  But what about and file.baz?  There can be only one option left, the new svn:global-ignores property.  Sure enough, on the root of the repository we find that property, with patterns that account for the remaining two ignored files:

1.8.0>svn pg svn:global-ignores -v --show-inherited-props calc\trunk
Inherited properties on 'calc\trunk',
from '.':

Final Thoughts

As we discussed in part 2 regarding svn:auto-props, svn:global-ignores should be set as high up the repository tree as is feasible.  And it deserves mention one final time: Be sure you understand the limitations of inherited properties discussed in part 1 — and thus the limitations of RDC via svn:auto-props and svn:global-ignores.


  1. It was intended that the ignore patterns in the svn:global-ignores property could be delimited with any whitespace (similar to the global-ignores runtime configuration option), not just newlines (as with the svn:ignore property), but there is a bug in 1.8.0 and only newline separated patterns work.
  2. The caveats I mentioned about inherited properties in part 1 still apply of course!

More from the Blog

View more Government Cloud
Apr 12, 2022 Government Cloud receives FedRAMP Authorization through sponsorship from the United States Department of Veterans Affairs

Enterprise Agile Planning
Flagship Agility solutions can effectively scale agile deve ...
Read More
Nov 22, 2021

What are the qualities of highly effective agile teams?

Enterprise Agile Planning
A team is the core unit of productivity in an agile organization. Wher ...
Read More
Nov 15, 2021

How an open-first attitude revolutionized government tech development

Enterprise Agile Planning
Public perception of government is often that it is slow-moving, reluc ...
Read More
cross functional
Nov 08, 2021

6 best practices for building resilient cross-functional teams

Enterprise Agile Planning
Agile frameworks prize the quality of resilience within every facet of ...
Read More
Contact Us