Subclipse svn:ignore

EclipseSvnSubclipse

Eclipse Problem Overview


I'm new to Eclipse. I'm using subclipse for connecting to my SVN. There are some folders and files I would like to add to svn:ignore, but it's grayed out. Is there an easy way to get subclipse to ignore files and directories?

subclipse

Eclipse Solutions


Solution 1 - Eclipse

You can't svn:ignore a file that is already commited to repository.

So you must:

  1. Delete the file from the repository.
  2. Update your project (the working copy) to the head revision.
  3. Recreate the file in Eclipse.
  4. Set svn:ignore on the file via Team->Add to svn:ignore.
  5. Restart eclipse to reflect changes.

Good luck!

Solution 2 - Eclipse

I was able to do this using TortoiseSVN directly from Windows explorer:

Right click on file to ignore->TortiseSVN->Delete and add to ignore list

I had to close then re-open the project in Eclipse, job done :)

Solution 3 - Eclipse

It seems Subclipse only allows you to add a top-level folder to ignore list and not any sub folders under it. Not sure why it works this way. However, I found out by trial and error that if you directly add a sub-folder to version control, then it will allow you to add another folder at the same level to the ignore list.

alt text

For example, refer fig above, when I wanted to ignore the webapp folder without adding src, subclipse was not allowing me to do so. But when I added the java folder to version control, the "add to svn:ignore..." was enabled for webapp.

Solution 4 - Eclipse

If you are trying to share a project in SVN with Eclipse for the first time, you might want to avoid certain files to be commited. In order to do so, go to Preferences->Team->Ignored Resources. In this screen you just need to add a pattern to ignore the kind of files you don't want to commit.

Eclipse preferences

Solution 5 - Eclipse

Working with Subclipse on Eclipse Indigo Service Release 2

I had commited folders with temporary files and logs lying under /src to the SVN repository. And after realizing it, I found myself in the same situation with a grayed out "svn:ignore"

I found following solution:

1. I deleted the folder from my Project Source

2. Team -> Commit... withouth the folder

3. Recreated the folder back into the project tree

Now I was able to use "Team -> Add to svn:ignore..."

Solution 6 - Eclipse

This is just a WAG as I am not a Subclipse user, but have you ensured that the folders containing what you're trying to ignore have themselves been added to SVN? You can't svn:ignore something inside a folder that's not under version control.

Solution 7 - Eclipse

What worked for me was following : (eclipse 3.3.6 Subclipse 2.4)

  • set svn:ignore property via tortoise : ( .settings .classpath .project target .apt_src one item at one line)
  • deleted the project from the eclipse
  • fresh checkout from the svn
  • import the project in eclipse (simple reimporting the project in eclipse did not worked for me)

Solution 8 - Eclipse

I just figured out how to do this:

It appears that when you add a parent folder to version control, Eclipse adds all sub-folders. Once the sub-folders are added to version control, it is not possible to ignore them.

Here's how to do it:

Right click on the top level folder and add to version control Right click on the child folder you want to ignore, revert Right click on the child folder you want to ignore, svn:ignore (which will now be available)

Solution 9 - Eclipse

to ignore certain files or turn off ignoring you can use the eclipse preferences-->Team -->Ignored Resource. Check or uncheck the resources you want to be tracked.

Solution 10 - Eclipse

This is quite frustrating, but it's a containment issue (the .svn folders keep track also of ignored files). Any item that needs to be ignored is to be added to the ignore list of the immediate parent folder.

So, I had a new sub-folder with a new file in it and wanted to ignore that file but I couldn't do it because the option was grayed out. I solved it by committing the new folder first, which I wanted to (it was a cache folder), and then adding that file to the ignore list (of the newly added folder ;-), having the chance to add a pattern instead of a single file.

Solution 11 - Eclipse

One more thing... If you already ignored those files through Eclipse (with Team -> Ignored resources) you have to undo these settings so the files are controlled by Subclipse again and "Add to svn:ignore" option reappears

Solution 12 - Eclipse

In case you're using TortoiseSVN and the file is already commited, go to your files project folder, right click on the file/folder you want to ignore, TortoiseSVN -> Unversion and add to ignore list. Then you delete the folder/file (click on it and then push DELETE on your keyboard), right click on your project folder, -> SVN Commit... This will delete the folder from the repository.... Now you can create your folder/file again and then it will be ignored.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKevMoView Question on Stackoverflow
Solution 1 - EclipseHenrikView Answer on Stackoverflow
Solution 2 - EclipseRobert SwiftView Answer on Stackoverflow
Solution 3 - EclipsecosmosView Answer on Stackoverflow
Solution 4 - EclipsenarkoView Answer on Stackoverflow
Solution 5 - Eclipsenenad_naukovicView Answer on Stackoverflow
Solution 6 - EclipseDave MarkleView Answer on Stackoverflow
Solution 7 - EclipsemambolisView Answer on Stackoverflow
Solution 8 - EclipseKevin DayView Answer on Stackoverflow
Solution 9 - EclipsealoksahooView Answer on Stackoverflow
Solution 10 - EclipseaercolinoView Answer on Stackoverflow
Solution 11 - EclipseJuan CaleroView Answer on Stackoverflow
Solution 12 - EclipseGirdacio PereiraView Answer on Stackoverflow