Question

I have some files which I can't add to svn:ignore using subclipse and I don't know why.

enter image description here

The usual reasons for not being able to add files to svn:ignore seem to be that the file is already in the repository or that the folder the file is in hasn't been created yet. Neither of these seem to apply here so I don't know what the cause is.

Was it helpful?

Solution

The file has clearly been added to version control. If this were the command line, then someone would have executed svn add but not yet committed the change. So the file is currently in the "scheduled-add" state. If you want to ignore the file, then first do Team > Revert to remove the scheduled add state. You will then be able to add it to svn:ignore for the parent.

UPDATE: When reverting files do not select files that are currently "unversioned". Reverting a file that is not versioned means Subclipse will delete the file. IF you ever accidentally delete something, note that Eclipse has a 'Restore from Local History' option. The items you removed will typically still be available in Local History.

OTHER TIPS

The answer above is very bad advice, Revert could delete everything if your files are not in SVN. The real answer is here: Subclipse svn:ignore, most likely cause for this issue is the parent folder is not added to svn.

To SVN ignore a file you already checked in:

1) Move the file from your workspace to a temporary directory
2) Team -> Synchronize with repository
3) Commit the file deletion
4) Copy the file back to your workspace
5) Refresh
6) Team -> Synchronize with repository
7) Add to .svnignore
8) Team -> Update (required for whatever reason)
9) Team -> Synchronize with repository
10) Commit changes to the parent folder

When I ran into this problem it was because I had already ignored it. Right click project and select Team and Show Properties. Keep in mind that svn:ignore is stored on the server so it will be there even after you pull down a project from the repo.

I tried a lot of ways to remove a folder from SVN version control. This is the only way that worked for me (Eclipse Mars):

  • Close Eclipse
  • Open .svn/wc.db (in the local project copy) with an appropriate SQLite database editor
  • In table nodes remove the entry of the folder and it's subfolders
  • Commit the changes (if necessary)
  • Start Eclipse

That's it.

Note: To add a file or folder to svn:ignore, it's parental folder must be under version control. The above steps are only intended to remove a file from version control, that already is under version control.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top