Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot eliminate phantom pending TFS change

Somehow, due to folder renamings and various other source code changes, I'm having an irritating problem. I'm showing a pending change for a file that cannot be undone in TFS.

This is a little hard to completely explain. Here is what the directory/file structure looks like in TFS:

RootFolder
    Folder
        FileA
        FileB
    OldFolderThatWasRenamedToFolder (shows add icon)
        FileA (shows "edit" pending change)

"OldFolderThatWasRenamedToFolder" had been renamed to "Folder" and is committed to TFS like that. The "FileA" under that non-existing folder references the same file as "Folder/FileA" but registers as a different file; for example, if I change "Folder/FileA," pending changes are shown for both "files." Whenever I undo pending changes for the phantom file, TFS reports the error:

No pending changes were found for .../Folder/FileA.

I cannot get rid of this annoying false pending change. I've done an update in the folder forcing an overwrite and even deleted the folder prior to the update. How can I eliminate this phantom pending change?

Update:

I found a potential clue. When I compare the "pending" file with the latest, no changes are detected, but when comparing with the "Workspace version," the file is compared with an older version of the file. I've recently tried deleting my workspace and creating a new one, but the same problem persists. What exactly is going on? Where are these pending changes even stored? Is there some file I can manually edit?

like image 851
Jacob Avatar asked Dec 30 '11 21:12

Jacob


4 Answers

In visual studio 2010, you can right-click on the phantom pending check-in on the "Pending Changes" panel and click "Undo..." on the popup menu, then click button "Undo Changes" on the dialog box "Undo Pending Changes", the phantom pending check-in will be removed from the list.

like image 130
Charlie Avatar answered Sep 24 '22 07:09

Charlie


You should be able to undo the pending change with a 3rd party tool called TFS Sidekicks. It is a free set of utilities by Attrice. I use it especially when I (or a client) come across such problems, as well as permissions issues, and the like.

Moreover, the tool will allow an administrator to do the same for other users. That means that it will solve situations where code is marked as checked out by a user that may no longer exist in the system.

Download it at http://www.attrice.info/cm/tfs/index.htm

Hope this helps.

like image 29
Assaf Stone Avatar answered Sep 22 '22 07:09

Assaf Stone


I figured out a way to fix this using the tf.exe command line. By entering this:

tf undo /workspace:MyWorkspace $/.../RootFolder/OldFolderThatWasRenamedToFolder/FileA

...I was able to undo the pending change. If anyone knows how to do this same thing without resorting to the command line, I'll accept their answer instead.

like image 30
Jacob Avatar answered Sep 25 '22 07:09

Jacob


I know this is an old post, but I expierenced the same thing.

What I found: John Kurlak's command line worked for me. I wanted to try something so I ran the TF MERGE again. This time I closed all Visual Studios open and then reopened it. The files showed up in Pending Changes and was able to Undo from there.

like image 21
MarcWeintraub Avatar answered Sep 23 '22 07:09

MarcWeintraub