tags:

views:

904

answers:

4

I would like to make it so that Subversion ignores my NetBeans IDE project configuration directories ("nbproject/") and their contents for all projects all the time. I read in the SVN docs that you can set global ignore patterns in ~/.subversion/config. For example, in my config I have...

### 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.
global-ignores = *.o *.lo *.la .class #*# .*.rej *.rej .*~ *~ .#* 
  .DS_Store *.log nbproject

Despite nbproject being in there, SVN does not ignore it. It shows up in status reports. Any way to prevent that?

The nbproject dir did somehow get into the repo, but I removed it. Even though it's not in the repository and does not contain a .svn dir, SVN refuses to ignore it. Maybe because it was somehow noted in the parent dir's .svn dir?


Update

I just completely deleted it from SVN and the filesystem and recreated the project. Now SVN is respecting the ignore pattern. I don't know why it wasn't before.

+1  A: 

I can't reproduce this with svn, version 1.6.2 (r37639): a directory that is not under version control gets ignored as it's supposed to be.

Gleb
+1  A: 

You can also do a svn propedit svn:ignore /path/to/dir, which will open up an ignore file. From there just type the * wildcard, and svn should ignore everything.

barfoon
+5  A: 

Note that ignore patterns in the config file only take effect when you add things.

If you already have the project in SVN, you need to manually attach the property afterwards.

And if you've got the directory you want to ignore in the repository, you need to get rid of it and clean up before adding the property.

Lasse V. Karlsen
I would guess that the most likely problem is that the directory is already in the repository.
Clyde
Probably. And then you have some odd problems. Like the fact that update will try to pull it down, but changes in it won't be committed.
Lasse V. Karlsen
+1  A: 

I had the same problem. The ignore-globals was exactly as above but since nbproject was already under subversion it was showing up in status.

do:

svn rm nbproject --keep-local

that should fix it. Did for me anyways.

Matti