Search code examples
svntortoisesvnrenamefilenamesfile-rename

Rename multiple different files in SVN


I'm looking to reduce filepath length due to various issues.

If I have two files in a folder, folder_with_long_name/file A.txt and folder_with_long_name/file B.txt. I want to change it to having folder_short_name/fileA.txt and folder_short_name/fileB.txt.

Currently, in order to rename these files and folders, I'd have to do 3 separate revisions, one for the folder, and one for each of the text files. Unlike other questions, I can't run a batch script, etc. to rename since there's no pattern to run on. It's a file-by-file, folder-by-folder rename.

I'd really like to be able to do this all in a single commit, to prevent 50+ different revisions.

If there's a way that I'm able to bundle this in with a regular commit as well, that would be even better. That would allow me to fix the filepath references in code at the same time, so that the code isn't broken during the renaming.


Solution

  • Turns out the issue was trying to do this through the repo-browser of TortoiseSVN. Doing it there ends up with each renaming taking a separate revision. By checking out locally and making the renames through the tortoiseSVN menu item, I'm able to combine it into a natural commit. This also maintains the history of the file.