Search code examples
javasvneclipse-indigosubversive

How to properly delete Java packages under SVN control?


I hava a Java project and am using Eclipse (Indigo) with the Subversive SVN plugin. I have successfully setup a remote SVN server that I'm using for the project repo.

I recently decided that I no longer needed a package that had a few unused classes in it. So I did the following:

  1. I deleted the package and all of its contents from inside Package Explorer
  2. I then right-clicked my project's root directory, and went to Team >> Synchronize with Repository
  3. I found the newly-deleted package showing up in the list of changes under the Synchronize SVN panel, right-clicked the package, and select "Commit". My thinking here was, "I've deleted the package locally, now I want to commit those deletion-changes to the server."

The changes were not committed, I got an error message (which I failed to look at...) and now this is what I see back in Package Explorer (the net.appuzi.domain.loads.http package is the one I deleted):

enter image description here

Now, if I go back into Team >> Synchronize with Repository, I see the package like so:

enter image description here

If I select both Java sources and try to "Override and Commit" them, I get the following error:

Some of selected resources were not committed.
svn: Commit failed (details follow):
svn: '/<path-to-my-project>/MyProject/src/main/java/net/appuzi/domain/loads/http/HttpMethod.java' is not under version control

So my immediate question is: how to "synch" my local working copy and the repo so that this deleted package no longer exists in either one (on the server-side I'm committing to trunk/).

Besides that immediate problem, which is my current blocker, I guess the next logical question is: what are the proper procedures for deleting packages that are under version control in SVN.?" Thanks in advance!


Solution

  • Try making sure that your local files are the same as the remote files before trying to delete. That way the only change being detected is the deletion of the entire files, and Eclipse won't get confused about conflicts. Just update or revert as necessary and then try deleting again.