IAmYourFaja
IAmYourFaja

Reputation: 56944

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!

Upvotes: 3

Views: 4987

Answers (5)

Suketu Bhuta
Suketu Bhuta

Reputation: 2023

I had a similar issue where the package got deleted from the SVN repository but still showed up in the Synchronize View in Eclipse. I have the subversion plugin installed in my Eclipse. To resolve my issue, I disconnected the project from SVN (Right Click on Project --> Team --> Disconnect...) while opting to check the option "Also delete the SVN meta information from the file system."

Once disconnected, I reconnect the project to SVN, synchronized with the repository once more and the deleted package/files were no longer visible in the Synchronize view.

Upvotes: 0

madarinho
madarinho

Reputation: 97

Try this:

  1. delete the packages.
  2. right click on your project inside the project explorer.
  3. go to "Team" and click on "Update to HEAD.
  4. again go to "Team" and click on "commit...".

Good Luck

Upvotes: 2

Frank Nguyen
Frank Nguyen

Reputation: 6653

Just delete the folder using Svn repository exploring, then update the project.

Upvotes: 0

Michelle
Michelle

Reputation: 2900

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.

Upvotes: 3

JavaKB
JavaKB

Reputation: 478

I had similar issue earlier, all I did was committing parent folder. In you case "src". Get those files back and delete them again, and this time commit the parent folder.

Hope this helps.

Upvotes: 0

Related Questions