views:

254

answers:

3

I just spent a fair amount of time selecting the files and directories I wanted under version control. I'm running subclipse under eclipse. I right clicked, Team, Add to Version Control. Now I want ONLY those files committed without right clicking the whole directory which contains a huge number of media files that I don't want handled by version control. If I go Team/Commit under that directory it hangs for a very long time... I thought by "Add to Version Control" there was an option to commit those files only. I just don't know how to do it.

I hope I explained the question properly..

UPDATE: Since people are talking more about ways to ignore files rather than committing what you're marked as "Add"ed to Version Control, let me put this a different way. What does "Add to version control" do exactly? It seems to be a feature without use.

+1  A: 

use svn:ignore for the resources you don't need under version control (Team > Add to svn:ignore)

Bozho
Yeah, but some of the resources might come under SVN later...I just wanted to do it the other way around in this case. Is it not possible?
joedevon
To my knowledge - no. You can remove the svn:ignore for the items that will later on become versioned.
Bozho
+1  A: 

You can add a pattern in Preferences/Team/Ignored resources (it's not the same as svn:ignore). You can also delete it, if it is no longer helpful.

snw
+2  A: 

Subclipse includes both unversioned files and files you specifically marked for addition when you open the commit dialog. It does not perfectly mirror the behavior of the command-line client. You have two options: uncheck each file you do not want to commit in the Subclipse commit dialog or use the command-line svn tool to commit. The command-line tool will only commit files you have marked for addition and will ignore the other files. Here's a simple example:

$ touch file
$ svn status
?       file
$ svn add file
A         file
$ svn status
A       file
$ touch file2
$ svn status
?       file2
A       file
$ svn commit -m "Added empty file"
Adding         file
Transmitting file data .
Committed revision 2.

? denotes a file that it unknown to svn and will not be put under version control automatically by svn commit. A denotes a new file that is scheduled for addition. Subclipse is trying to mirror this behavior by allowing you to "add a file to version control", which is the equivalent of the command-line svn add. but also includes unversioned files not scheduled for addition in its commit dialog (which I personally find somewhat annoying). If you run svn status on the command-line, those files which you "added to version control" in Subclipse will be marked with an A while those you did not will be marked with a ?. You won't have to run any svn add commands since you did that already in Subclipse.

misterbiscuit
Thank you sir! I tried that as well, but I got weird subversion version wrong error...I've seen others had similar errors...but I thought the command line could provide the answer.
joedevon
You're welcome!
misterbiscuit