My IDE doesn't know that I use Subversion, and any time I rename a class (Java) it renames the file without notifying the version control system. I would of course like the file's history to be retained. I understand that in TortoiseSVN there is an option called "repair move" that fixes the move, but that's not an option since I'm on Ubuntu. Is there a way to repair the move from the command-line?
If you right-drag the folder and use "SVN move versioned item(s) here", then you keep the history. Even the history of the files within the folder.
Renaming a file. Normally you can just use SVN Rename on the context menu. This is analogous to the Move command described in the Moving or Copying a file recipe. It is almost as if you are doing two separate steps: an Add operation with the new name and a Delete operation of the old name.
If you remember the old name/location of the file:
mv new-filename old-filename
svn mv old-filename new-filename
You, of course, need the Subversion command-line client installed, which you probably have. If not, sudo aptitude install subversion subversion-client
should do the trick.
Per your comment, no, I don't know that there is an easier way than this. If you're not sure what your old filename was, svn stat
may give you a hint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With