R – Source control setup

eclipsesvnversion control

I thought I'd get myself a Subversion setup at home for my hobby projects, and I'm trying to do it right, first time (my work's source control control policies or lack of them are, well, not perfect).

The thing I'm struggling with is this: I'd like to version entire Eclipse projects. This will be good from Eclipse's point of view – I'll just let it do its thing, and should just mean I need to ignore a few binaries / whole build directories and set up these ignores just once when I set up the project (right?). Anyway, I've tried it a couple of times and svn seems to get confused and ignore my ignore settings. What should be the correct procedure?

Thanks.

PS I'm doing the svn bits from command line, trying to avoid a GUI till I'm happy with it.

Best Answer

There are basically two ways to instruct subversion to ignore files either by name or by pattern.

The first way is to find the configuration file (location depends on platform) and add the file name or pattern to the global-ignores list. This applies to all svn operations on the machine or for that user.

The second way is to set the svn:ignore property on a versioned directory, for example:

svn propedit svn:ignore myDirectory

This brings up an editor for the svn:ignore property where you can add for example:

bin
obj
*.bak

Note that this property change is also versioned and needs to be committed, after that they apply for everyone working on that directory (after an update of course). This property doesn't apply recursively to subdirectories.

For more info see the svn book.