Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse is trying to build the files in my .svn directories... how can I tell it to stop?

I'm storing my Android project in a Subversion repository. After recently shuffling a bunch of stuff around I started getting tons of errors like:

syntax error    entries /project_name/src/.svn  line 1  Android AIDL Problem
syntax error don't know what to do with ""  entries /project_name/src/.svn  line 28 Android AIDL Problem

etc.

It seems as if Eclipse is trying to build the files in the .svn directories now. This setup used to work fine, how can I fix this?

like image 972
Jeremy Logan Avatar asked Jul 18 '09 00:07

Jeremy Logan


People also ask

Can I delete .svn folder?

There is only one . svn folder, located in the base of the working copy. If you are using 1.7, then just deleting the . svn folder and its contents is an easy solution (regardless of using TortoiseSVN or command line tools).

What is the .svn folder?

svn, also known as the working copy's administrative directory. The files in the administrative directory help Subversion recognize which of your versioned files contain unpublished changes, and which files are out of date with respect to others' work.

How do I delete a .svn file?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…

What are .svn files?

svn , also known as the working copy administrative directory . The files in this administrative directory help Subversion recognize which files contain unpublished changes, and which files are out-of-date with respect to others' work.


2 Answers

Although you can solve this problem by installing a plugin such as Subversive, which has already been mentioned, you can also solve this problem without the plugin.

You can tell eclipse to ignore files stored in the .svn directories inside your build path. To do that, open up the project properties by right-clicking on the project and then select the Java Build Path option on the left. Look for the Source tab. There you'll see all your source folders (if you haven't changed anything this would be gen and src for Android SDK 1.5r3). Double click the Excluded item in the tree and add two exclusion patterns for each directory:

.svn/**
**/.svn/**

You should set the svn:ignore keyword of your project directory to ignore the directories, which contain automatically generated files, as they can be generated at any time and do only take up space in your repository. For a current Android SDK 1.5r3 project this would be the bin and the gen directory. If you ignore the gen folder this also means, that you don't need to set the exclusion pattern for this directory, as Subversion doesn't create a .svn directory inside ignored items.

Edit: As mentioned by Henrik, it is wise to clean the project after such a change.

like image 170
Xperimental Avatar answered Sep 20 '22 04:09

Xperimental


Install the Subclipse plugin for Eclipse. Then Eclipse will know what the .svn folders are for and quit treating them as source directories:

http://subclipse.tigris.org/

like image 43
Rafe Avatar answered Sep 21 '22 04:09

Rafe