Tuesday, October 6, 2009

Subversive not supporting rename/move in workspace

One of the nice features of Subversion over CVS, is the the support for resource renaming. It provides you the opportunity to easily follow the history of a file, even if it has been renamed of moved around your directory structure.

Too bad that the Subversive plugin for Eclipse has some problems with supporting this feature, and there seems to be no easy fix. The command line Subversion client works fine, but what if we want to stay in our comfortable, fancy IDE?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=213991

The Subversion rename is actually a copy together with a delete. So, the workaround in Subversive: open the context menu of your file, select "Team", "Copy To .." and input the new destination, while keeping your history. Next step is to delete the file on the original location. If you check the history of the "new" file, Subversive won't show you any remote revision information. Don't be afraid, it will re-occur once you have committed your changes.

On the other hand, the SVN Repositories view supports moving files around directly on the repository. This is fine if you don't need to change file internally or any other file in the same commit. But if your move some Java source file, you probably need to update some import references and package definitions as well. So you want to apply these changes in your workspace first, and commit all changes together, instead of having a inconsistent (temporary) state at the repository.

Now you know this, take up the challenge and fix the bug in Subversive! ;-)