views:

30

answers:

2

So, I was trying to change the capitalization of a folder at the route of a team project's source control tree. I have come up with a couple ways to do it that are rather stupid, but am wondering if there are simpler ways to do it. The fundamental issue is that the rename and move functionality are both designed on the assumption that the name will be different, which means they cannot be used to change capitalization unless applied twice.

Stupid Method 1:
Step 1: Check out project
Step 2: Remove workspace binding
Step 3: (optional) Make workspace binding for new folder
Step 4: Move to a subfolder or to a folder creating in step 2
Step 5: Check in
Step 6: Repeat Steps 1-4 in the other direction.


Stupid (and dangerous) Method 2:
Mess around with the database directly, assuming you have access to it.

A: 

Is it possible to rename the folder, say with an underscore at the end. Then rename it again with the correct case and no underscore?

This may need to be done in Source Safe and the local drive.

Just a thought

Nanook
Yes, I can do that. Doing so would involve using Stupid Method 1.
Brian
+1  A: 

tf rename $/project/FooBar $/project/FOObar should work w/o any needless complexity. I just tried it, didn't see the problem.

Richard Berg
This gives an "unable to determine the workspace error," despite the mappings being valid and me running `tf workspaces` to grab the workspaces.
Brian
Were you inside the workspace that contains $/project? Are you able to run other tf commands that modify FooBar? Are you mapping FooBar directly or a parent of it -- I don't think TFS will let you rename something that's directly mapped.
Richard Berg
I'm in a workspace that contains $/project. I'm not sure what other tf commands I should be trying. I was originally mapping FooBar directly, but I did try mapping a parent and reloading the workspaces again; it didn't make a difference.
Brian
Accepted/+1. Changing the workspace to not map the folder directly allowed me to change the name of the folder in two renames but only one checkin (via the GUI), rather than using stupid method 1.
Brian