Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignoring directory when doing a SVN commit in Eclipse

Tags:

eclipse

svn

I am currently using Eclipse (Indigo Service Release 1) for Android development. When I do try to "commit" changes which I make to a specific project, I am prompted to commit all the files under "bin" directory.

I do not want to commit it and a simpler solution is to un-check them all every time I commit. However this is getting annoying and I was wondering if there is a permanent fix to it.

I tried :

Preferences -> Team -> Ignore Resources -> Add Pattern with "bin" as the added pattern.

However it doesn't really provide a permanent solution.

Any suggestions?

like image 223
Rajat Anantharam Avatar asked Nov 18 '11 09:11

Rajat Anantharam


People also ask

How do I ignore target folder in svn?

To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down. svn propset svn:ignore target .

How do I set property to ignore in svn?

Use the following command to create a list not under version control files. Then edit the file to leave just the files you want actually to ignore. Then use this one to ignore the files listed in the file: svn propset svn:ignore -F ignoring.

How do I commit a directory in svn?

Right-click in an empty area of the folder and select Refresh. You'll see “+” icons on the folders/files, now. Right-click an empty area in the folder once again and select SVN Commit. Add a message regarding what you are committing and click OK.


1 Answers

You need to set the svn:ignore property.

From within Eclipse this is best achieved by right clicking on the bin directory (in Package Explorer/Navigator). Then select Team -> Add to svn:ignore and in the subsequent dialog select "Resource(s) by name".

When you next commit the project the newly set svn:ignore properties will be committed too and the bin directory (and contents) will be permanently excluded.

Steps:

  1. Turn off automatic build and clean the project.
  2. If the directory is already committed, do Team -> revert, delete it (deleting in Eclipse will do an svn delete) and then commit this change.
  3. Now recreate the directory (running your build may do this)
  4. Then on the directory select Team -> Add to svn:ignore and in the subsequent dialog select "Resource(s) by name".
like image 127
earcam Avatar answered Oct 26 '22 17:10

earcam