Source Control Setting

I felt like I was getting a Subversion setup at home for my hobby projects and I am trying to do it right the first time around (my source control policies or lack thereof are, well, not ideal).

The thing I am struggling with is this: I would like the versions of all Eclipse projects. This will be fine from an Eclipse standpoint - I'll just let myself do it, and should just mean that I need to ignore multiple directories with binary / whole assemblies and set these ignores only once when I set up the project (right?). Anyway, I've tried this a couple of times and svn seems to get confused and ignore my ignore settings. What is the correct procedure?

Thank.

PS I'm doing the svn bit from the command line trying to avoid the GUI until I'm happy with it.

+1


source to share


5 answers


Basically, there are two ways to instruct subversion to ignore files by name or by pattern.

The first way is to find the config file (location depends on the platform) and add the file name or pattern to the global ignore 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 the directory version, for example:

svn propedit svn:ignore myDirectory

      



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

bin
obj
*.bak

      

Note that this property change is also versioned and must be committed, after which they are applied to everyone working in that directory (after the update, of course). This property does not apply recursively to subdirectories.

See svn book for more information .

+2


source


IIRC, Subversion will not stop you from svn add

files you have marked as ignored if you explicitly add them by name (although that may warn you). The svn: ignore property primarily prevents them from appearing in svn status

.



Also, AFAIK, the svn: ignore property is not recursive, so it will only work on the lower child nodes of the directory it is installed on.

+1


source


If you are on a linux box you can try these steps, if on windows it is enough the installer should do something for you. https://help.ubuntu.com/community/Subversion

Also subversive book book can help http://svnbook.red-bean.com/en/1.5/index.html

0


source


Could you be clearer as to what exactly svn is getting confused about? Remember that the property svn:ignore

is a setting for each directory; that is, if you want to ignore files .foo

in ./bar

and in ./bar/abc

, you need to edit the property for each directory. Yes, it's a pain in the butt.

0


source


There are several ways to add projects to source control. Here's a higher level description:

One way is to import an empty top-level folder, then svn checkout, then copy the project files into that working copy, then svn add everything but the files to be ignored (or svn return specific files / folders) and set the ignore properties as desired. and then commit.

Another way is to make a copy of the project files, manually delete the files and folders you want to ignore, and then import svn. Then delete these files. Then check out svn, then set the ignore properties on that working copy and svn commit. Then copy the original ignored files / folders into a working copy.

Of course, the more things that are globally ignored, the easier these steps will be.

0


source







All Articles