commiting the deletion of Java files and the containing package in Subclipse

35 views Asked by At

Lately we had to switch at work from Subversive to Subclipse because we needed to upgrade to Java 11 and Subversive is no longer supported in recent versions of Eclipse. This has worked somewhat fine, but we're encountering problems when trying to delete files sometimes. For example, suppose you have the below Java package tree that you want to delete with no other packages or files inside the tree.

package
|---file1.java
|---file2.java

The problem I encountered is that no matter how I commit the deletion of this, it causes problems with the subsequent update by my coworkers. I have tried to commit the entire delete operation at once, and I've tried commiting the deletion of the Java files and of the package in separate commits. No matter how I commit it, my coworker ends up with his local work copy that he's updating in a broken state.

Turns out that when he synchronizes with Subversion, for some reason some of the commits get squashed in a single commit of the deletion of the package, with no deletion of the underlying java files. When he then tries to update that deletion to his local work copy, it only half deletes the files: they still remain in his Eclipse project explorer view, but they are successfully deleted in the Windows file system.

Because they remain in his Eclipse project explorer view, he gets warnings and errors related to the deleted files such as import statements that don't resolve and build path errors. However, because they are removed from the file system, Subclipse can't update them because as far as Subclipse is concerned, his local work copy is up to date! He has to recreate the files in Windows Explorer manually and then is able to override and update to fully get the changes in.

We also have the problem that some of the changes we commit, when synchronizing, appear to belong to random older commits changing that file, even if they are over a decade old, with multiple machines weirdly enough resolving the changes to different commits. Weirdly enough, a committed change often only gets partially resolved to an older commit, usually only 1 or 2 files, with the rest of the changes resolving to the recent commit.

We think these issues could somehow be related. Is this a known issue with Subclipse in certain environment? And if so, how do we fix it?

0

There are 0 answers