git-tfs/git-tfs — pull request #630 by daveh551 (2014-07-11 18:47:21+00:00)
Title: Fix workspace conflict

This pull request addresses issue #597 "Better workspace error management". It is a work in progress, as I have tested it in my own usage on TFS Server 2010, and it went from aborting the application randomly about 3 or 4 times an hour with Workspace MappingConflictException to running continuously for 10 days without aborting the application.

The fix catches and MappingConflictException from the GetWorkspace method, then calls CleanupWorkspaces to Delete the offending workspace, and catches the Non-existent workspace exception that results from that call. Since this exception is telling us the workspace we were trying cleanup is already gone, we simply go on and retry the GetWorkspace call.