views:

221

answers:

3

What is the best-practice for maintaining a source code repository that automatically (or, at least, by default) rejects the inclusion of /bin, /obj, *.suo, etc. files?

Should each developer be required to set a "global ignore" pattern list for their SVN client installation? [This seems too broad of an exclusion.]

Or, should the source repository maintainer flag each offending file and directory with an SVN:exclude? [This seems too time consuming.]

Or, is there another way to do this? Is it possible with SVN to create ignore lists that are folder-level specific?

+1  A: 

Set the svn:ignore property on directories that contain files/directories you want to ignore. It's a one-shot deal.

Romain Verdier
Can the developer still explicitly add an ignored file/type/directory from their working copy?For example, when you set the ignore pattern in TortoiseSVN, you no longer see any of those file types show up in the dialog. However, you can go explicitly to the file in explorer, right-click, and add it. Does setting the svn:ignore property behave similarly or can you literally *never* add an ignored item?
Burly
Also, can you explicitly add *recursively* even with an svn:ignore pattern set?For example, if you are adding a third-party lib and you want it to include everything (e.g. included .dlls) upon initially incorporating it into your project but for subsequent commits, you want it to go back to ignoring (e.g. don't include items that you have subsequently compiled). The only way I can accomplish this with TortoiseSVN using the global ignore pattern is to temporarily disable it, perform the add/commit, and then re-enable it. Doing it this way with svn:ignore would be significantly more difficult.
Burly
+1  A: 

We currently use a mandated global ignore pattern on the client side, which is less than ideal as you've pointed out. We do at least have a document for setting up and configuring the development environment, which includes the latest authoritative ignore pattern (such as this one http://stackoverflow.com/questions/85353/best-general-svn-ignore-pattern).

I'm curious about the behavior of svn:ignore as Romain Verdier suggested. I've posted a comment to his answer.

Burly
A: 

I suggest you to use Ankhsvn. It will do all these things for you.

tanathos
I don't think that it handles ignore patterns automatically for every client of the source control repository like James is asking for. Ankhsvn handles the ignore pattern /you give it/, just like TortoiseSVN, which means that every developer must configure Ankhsvn to use the proper pattern, which is what James is trying to avoid.
Burly