Alex
Alex

Reputation: 44325

How to make subversion to ignore a sub directory, although it is defined in the properties via propedit?

In svn version 1.7.9 I am trying to ignore a directory in subversion. I have tried to insert the following line into the editor popping up when calling

svn propedit svn:ignore .

Here is the first attempt:

addons/pnc_tests/utils_mod

And here is the second attempt:

utils_mod addons/pnc_tests

But in both cases svn st gives the following output:

?       addons/pnc_tests/utils_mod

So what text do I have to put into the propedit file in order to ignore that directory? Just adding filenames in the propedit file works fine, those are being ignored.

Upvotes: 0

Views: 247

Answers (1)

David W.
David W.

Reputation: 107040

You can only ignore the immediate subdirectory. To do what you want, you have to attach the svn:ignore to the addons/pnc_tests directory itself:

$ cd addons/pnc_tests
$ svn ps svn:ignore utils_mods .   # Better using `pe` if there's more than one ignore

Of course, the old caveat that you cannot ignore an already added in file still applies (although in your question, it doesn't look like this is an issue).

Subversion 1.8 introduces inheritable properties which might be more what you want. Inheritable properties means that a file or directory in a directory subtree inherits the property from a tree ancestor. Two inheritable properties are svn:global-ignores and svn:autoprops. These act very similarly to these settings in the user's Subversion configuration file -- except can be applied to the whole repository.

Imagine you could do something like this:

$ svn ps svn:global-ignores "*test*" .

And any directory or file in the entire file tree with test in the name will be ignored.

Upvotes: 1

Related Questions