Mr. Boy
Mr. Boy

Reputation: 63710

I deleted my working copy but TFS thinks I've still got it

I deleted a local copy of a TFS source-code branch (actually I renamed the branch and had to delete the old-named version), but Source Control Explorer window in Visual Studio says I still have the latest version so whenever I double-click a file, I get an error that the file doesn't exist.

Is TFS supposed to notice when I delete a local working copy i.e. this is a glitch?

How can I address it? Get the latest version and then delete it?

Upvotes: 1

Views: 66

Answers (1)

Edward Thomson
Edward Thomson

Reputation: 78623

Is TFS supposed to notice when I delete a local working copy...?

No. TFS TFVC expects that it controls your working directories, at least with a Server Workspace. When you start doing things without telling it, then it has no idea.

If you want to remove files from your local drive, do a get of changeset 0 on that path (where the files won't be) and/or delete your working folder mapping or delete the TFS workspace.

Why does it work this way? Performance. If you have 10+ GB of sources, you can't afford to have your version control system scanning your filesystem to try to figure out what you've done. That's why TFVC Server Workspaces work this way.

Change your workspace to a Local Workspace if you have only a small bit of source code and you want to scan the filesystem for changes. Or switch to Git in TFS if you want a complete distributed experience.

Upvotes: 4

Related Questions