1

I'm basically doing something like dropbox but using TFS.

Everything works smooth except when I delete a file in side my workspace folder.

Let's say I deleted a file test.txt in my local workspace (already mapped to TFS); when I use tf add $/Test/Doc /recursive, it's saying no pending change detected.

But if I use tf status $/Test/Doc /recursive, I could see the delete change actually is detected. Similar case happen when I do rename a file or move a file into another folder under Doc.

Is there any way to add this detected changes to pending change and use tf checkin $/Test/Doc /recursive to checkin?

I tried to use tfpt online /deletes also, but with error "This command doesn't support local workspaces."

If this problem can be solved without using tfpt will be better. Thanks ahead.

Tim Abell
  • 11,186
  • 8
  • 79
  • 110
bluestar
  • 83
  • 7

1 Answers1

1

Do not delete the files in the local workspace directly. This may cause some unkonwn troubles. If you want to delete the files in source control , you can use this command tf delete (local mapping path)\test.txt (Make sure you have enough permissions). Then check in your changes.

For your situation:

First, you can undo your pending changes use undo command.

  • If you want to delete the test.txt, use the command mentioned above.
  • If you still need it, you can remapp it from sever to your local worksapce.

update enter image description here

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • So you mean it is not quite possible to use TFS similar to dropbox by just using TFS command? If really cannot, I may need to search some other way. Anyway, thanks for your kind reply. – bluestar Dec 10 '15 at 08:06
  • Meanwhile, can I delete the file first, then use tf delete (mapping)\test.txt after the deletion? – bluestar Dec 10 '15 at 08:07
  • No your can't, the command will retrun ''file could not be found in your local workspace" . I'm not familiar with dropbox. If you mean you want to use source control in the windows file explorer. You may need to try tfs power tools https://visualstudiogallery.msdn.microsoft.com/898a828a-af00-42c6-bbb2-530dc7b8f2e1 (this is for tfs2015 and there is for tfs 2013 and so on..) After installing this, you can delete file or rename, move file in the local workspace. Then right click the file or project select team foundation server select what you want just like the screenshot updated above – PatrickLu-MSFT Dec 10 '15 at 08:21