Refactoring a package by giving it a new name can give quite annoying problems when trying to commit it from within Eclipse using the Subclipse plugin.
- Rightclick on your project and select Team --> Synchronize with Repository
- Select the incoming view
- Now note in the incoming view, it shows conflicts on some/most directories (packages) that were renamed. Just do an update on those.
- Go to the outgoing view
- If you now select all items with a '-' (the deleted ones) and then try to commit, you get an error on the commit: Tree remains in conflict. Notice the red/green icons on several directories (actually the ones that had a conflict in step 3), see screenshot:
- Right click on one of those entries (multiple select not supported for the Show Tree Conflicts operation) and select Team --> Show Tree Conflicts. That shows something like:
- Rightclick and select Resolve...
- On that next screen:
select only Mark conflict resolved.
- Click Finish
- Now the entry is not marked red/green any more, and only shown with a '-' in the Synchronize screen!
- Do that for all red/green arrows (conflicts)
- When done, right-click on all items marked with a '-' and select Commit. And that succeeds!
- Finally, commit now the ones marked with '+' (so the added ones)
- Really final step: note that sometimes some empty packages with the old name stay around. Deleting them in Eclipse and then trying to commit gives again conflicts(!). Those I just delete directly from the Repository perspective and do an update on those.