How to rename Java packages without breaking Subversion history?

Posted by M. Joanis on Stack Overflow See other posts from Stack Overflow or by M. Joanis
Published on 2010-03-21T04:28:30Z Indexed on 2010/03/21 4:31 UTC
Read the original article Hit count: 420

Hello everyone,

The company I'm working for is starting up and they changed their name in the process. So we still use the package name com.oldname because we are afraid of breaking the file change history, or the ancestry links between versions, or whatever we could break (I don't think I use the right terms, but you get the concept).

We use: Eclipse, TortoiseSVN, Subversion

I found somewhere that I should do it in many steps to prevent incoherence between content of .svn folders and package names in java files:

  • First use TortoiseSVN to rename the directory, updating the .svn directories.
  • Then, manually rename the directory back to the original name.
  • To finally use Eclipse to rename the packages (refactor) back to the new name, updating the java files.

That seems good to me, but I need to know if the ancestry and history and everything else will still be coherent and working well.

I don't have the keys to that server, that's why I don't hastily backup things and try one or two things. I would like to come up with a good reason not to do it, or a way of doing it which works.

Thank you for your help,

M. Joanis

© Stack Overflow or respective owner

Related posts about java

Related posts about eclipse