0

I need to rebuild my local workspace on my workstation in order to remove a number of conflicting changes that prevent me from making further changes.

I'm getting the following error and need to resolve it so that I can continue with my work.

Conflict "uc_example.ascx.cs" - Unable to perform the get operation Because you have any available conflicting edit

I prefer to do this from the command line.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
hdmq
  • 277
  • 1
  • 4
  • 14
  • Why do you need to do that? – Daniel Mann Jan 21 '15 at 14:33
  • I just want to test a possible solution to the following error: Conflict "uc_example.ascx.cs" - Unable to perform the get operation Because you have any available conflicting edit – hdmq Jan 21 '15 at 14:43
  • I think the workspace be soiled, have to remove it, create it and map it – hdmq Jan 21 '15 at 14:49
  • Can you describe the things you ran, what the exact output is and what the current pending changes on the `uc_example.ascx.cs` are? – jessehouwing Jan 21 '15 at 14:49

1 Answers1

3

Try to resolve the issue first

To see what changes there are pending on the file in question you can run:

tf status $/path/to/your/uc_example.ascx.cs /format:detailed 
         /collection:http://yourserver:8080/tfs/YourCollection /user:*

Optionally include a workspace using teh /workspace:name parameter.

To undo the pending changes on your file (make sure you have a backup of the to be content):

tf undo $/path/to/your/uc_example.ascx.cs
         /collection:http://yourserver:8080/tfs/YourCollection

Optionally add the workspace where you need to undo the change (you may need to have Undo other people's changes permissions).

tf undo $/path/to/your/uc_example.ascx.cs 
         /workspace:TheWorkspaceWithEditYouWantGone;OwnerOfSaidWorkspace
         /collection:http://yourserver:8080/tfs/YourCollection

To see what changes there are pending on the file in question you can run:

tf status $/path/to/your/uc_example.ascx.cs /format:detailed 
         /collection:http://yourserver:8080/tfs/YourCollection

If there is a pending delete you cannot try to check in a pending edit. Or if there is a pending merge you cannot do a delete. This may happen when you delete a file (which pends a delete), then create a new file with the same name (which will try to pend an add, and fails). You will either need to check in your delete first, or undo your delete and then overwrite the file. You can't delete and add in the same checkin.

If that fails, blow away the workspace

If that doesn't help you can remove the workspace, create a new one, get the latest sources, reapply your changes and try to check them in.

WARNING THIS WILL BLOW AWAY ALL PENDING CHANGES ON THE WORKSPACE MAKE SURE YOU HAVE A BACKUP BEFORE PROCEEDING!

tf undo /workspace:YourWorkspaceName /recursive /noprompt
         /collection:http://yourserver:8080/tfs/YourCollection

tf workspace /delete /collection:http://yourserver:8080/tfs/YourCollection 
         /workspace:YourWorkspaceName

tf workspace /new /noprompt /collection:http://yourserver:8080/tfs/YourCollection 
        /location:local YourWorkspaceName

tf workfold /map $/Server/Folder d:\Your\Local\Path /workspace:YourWorkspaceName
        /collection:http://yourserver:8080/tfs/YourCollection 

WARNING BELOW LINE WILL GET AND FORCE ALL FILES TO THE LATEST VERSION

tf get d:\Your\Local\Path /recursive /version:T /force /overwrite

But if the item has a conflicting change on another person's workspace, it won't help you to blow away your workspace.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341