How to rename a folder

Aug 25, 2007 at 4:00 PM
Edited Aug 25, 2007 at 6:08 PM
There doesn't seem to be a rename command for cpc... I want to rename a folder.
At first I thought I could copy the entire folder structure, and then mark the old one as deleted. But there's no way cpc is going to let me do this. No matter what I try, I get this error;

In path D:\Code\CSharp\CABDevExpressRelease1\CABDevExpress.ExtensionKit:
Expected server path: $/CABDevExpress/CABDevExpress.ExtensionKit/
Actual server path: $/CABDevExpress/DevExpress.CompositeUI/

I've managed to delete the files. Contrary to the documentation, files are not deleted from the filesystem. But I can't add my new folder because cpc thinks it already under source control. Which is complete bull, I must say.

And once again, I try to isse the status statment only to be given an error. cpc, just flat out will not let me commit this particular folder.

I think this is my favourite error. If I rename the folder to something completely different, and then try to add it, I get the same error every time (insert folder name here)
error: CABDevExpressRelease1\CABDevExpress.ExtensionKit2 is already under source control

That's pretty funny, because it is most certainly not under source control already, because I just renamed it to be called that. for the first time, just now.

Please someone convince me that cpc is not a pile of poo.
Coordinator
Aug 25, 2007 at 7:22 PM
Edited Aug 25, 2007 at 7:36 PM
We don't currently support rename. There are two open feature requests around this:

Add command: move
Support moved folders in "syncup"

CPC stores a hidden folder named _tfs inside each folder which tracks the source control information. When you rename the folder, because of this metadata, it still believes the folder is under source control, in the old place. This is causing both of the symptoms your're seeing: the folder is in the wrong place based on its metadata, and still carries the information about where it comes from source control.

Until rename is supported, there are two work arounds:

1. Create the new folder structure(s) and move all the files by hand to the new folder structure(s).
or
2. After you've renamed your folder, find and delete all the hidden _tfs folders in that folder (and all the sub-folders).
Aug 26, 2007 at 12:52 AM
Edited Aug 26, 2007 at 3:16 AM
Right, I got you. I should have thought of that (I have hidden files not showing at home, so didn't notice)
I fixed up the problem I had.

If you try a workaround and you delete all 'tfs' folders, but forget one... and then go to all the trouble to rename and set it up right... you'll be meddling for hours trying to get to the bottom of the problem. So far, I've spent longer wrestling with CodePlex source control than I have actually writing code to contribute to the project.

I apologise for being blunt, but this site shouldn't have went live without a rename and/or move. I find this unacceptable. I miss SVN.
Aug 26, 2007 at 3:30 AM
Edited Aug 26, 2007 at 3:44 AM
How about this situation:

I've spent 2 hours cleaning up, renaming, syncing, removing _tfs folders and now I get this:

error: The following errors occurred:
The item $/CABDevExpress/BankTeller QuickStart/QuickStarts/BankTeller/BankTellerModule/Resources/customersSmall.png is locked for
check-out by SND\PandaWood_cp in workspace mosesmachine.

Can I unlock these without reverting everything and starting again?
I wish it would just say "I realise this is you, would you like me to unlock them for you?"... that would be nice ;-)

If I can't fix this soon, I would be better off creating a new project on CodePlex "MyProject2" and committing all the files to it and deleting the old project... saying "We've moved because we spent too long buggering around with source control"

I honestly don't know what to do at this stage. Even if I start again, there must be 'somewhere' else on my machine that the files are considered locked at (probably a deleted directory).
Coordinator
Aug 26, 2007 at 6:34 AM

PandaWood wrote:
I apologise for being blunt, but this site shouldn't have went live without a rename and/or move. I find this unacceptable. I miss SVN.

There are many source control clients available for TFS, not just cpc. We keep a list here: Source control clients

cpc was, in some ways, an experiment to see if we could adapt TFS (and its checkout/edit/checkin model) to behave more like Subversion (with its edit/merge/commit model). Our work with cpc is helping us build SvnBridge, a tool that will eventually allow users to use Subversion clients against our TFS servers. That client is still in the alpha stage, but all of our source control client effort right now is focused on SvnBridge.


error: The following errors occurred:
The item $/CABDevExpress/BankTeller QuickStart/QuickStarts/BankTeller/BankTellerModule/Resources/customersSmall.png is locked for
check-out by SND\PandaWood_cp in workspace mosesmachine.

Can I unlock these without reverting everything and starting again?

cpc does not lock files. It sounds like, at some point, you locked files for editing while using Team Explorer (or maybe some other lock-based source control client, like Teamprise). You should be able to fire up Visual Studio and launch Team Explorer again, and undo the edits on the files.

Hopefully you did not mix using Team Explorer and cpc on the source files in the same directories. If you did, beware that unlocking the files may cause Team Explorer to overwrite your changes. I would strongly recommend backing up a copy of your source code (including the hidden files & folders) before you undergo this, just to be safe.

As an alternative, if you're sure you don't need any of those changes in that workspace, you can use tfc to delete the workspace "mosesmachine". You can issue the command "tfc workspace https://tfs0x.codeplex.com delete modesmachine" (where tfs0x.codeplex.com is the name of the TFS server with your project on it).
Oct 2, 2007 at 3:24 AM
Hi Brad,

If all the current effort is going into SvnBridge, is the intention to phase out development of CPC? Are all of the active CodePlexClient committers either Microsoft (or Microsoft affiliated) employees? Just trying to gage survivability of the project.

Thanks,
Shane