It's possible to do this in SourceSafe, but it requires a bit of manual intervention:
- First, make sure the file you want to rename is checked in.
- In SourceSafe, right-click the file and select
Rename
from the menu (or alternatively, simply press F2), then rename the file.
- This only renames the file within SourceSafe. You will have to check out the renamed file to your working folder and then delete the original file from your working copy to complete the rename.
If you view the file's history (right-click, then Show History
, or altenatively, Ctrl-H
), you will see that all of its history is intact. Note, however, that SourceSafe will refer to the file by its new name in all of the history entries for the file. The actual rename is tracked at the project folder level. If you view the history of the folder that contains the renamed file, you'll see a history item indicating that the file was renamed from oldname
to newname
.
Addendum: A note on retrieving older versions of renamed files from history
Joe White commented on this answer that SourceSafe doesn't honor the original filename when you do a Get
on an older version of a renamed file. This is true, if you are getting the older version from the File History viewer.
However, if you do a Get
of an older version of your code (before the rename) from the parent folder's history viewer, SourceSafe will correctly use the original filename when it puts the files in your working folder.
The reason for this behavior goes back to the fact that SourceSafe tracks renames at the parent folder level and not at the per-file level.