Why doesn't TFS get latest get the latest?

前端 未结 18 1168
陌清茗
陌清茗 2020-11-30 00:22

Why Why WHY doesn\'t TFS\'s get latest work consistently?

You would have thought that feature would have been tested thoroughly.

What I have to do is, get sp

18条回答
  •  猫巷女王i
    2020-11-30 00:48

    Team Foundation Server (TFS) keeps track of its local copy in a hidden directory called $TF.When you issue the "get Latest Version", TFS looks into this folder and see weather I have the latest copy or not. If it does it will not download the latest copy. It does not matter if you have the original file or not. In fact you might have deleted the entire folder (as in my case) and TFS won't fetch the latest copy because it does not look into the actual file but the hidden directory where it records changes. The flaw with this design is, anything done outside the system will not be recorded in TFS. For example, you may go into Windows explorer, delete a folder or file and TFS wont recognize it. It will be totally blind. At least I would expect there Windows would not let you delete this file but it does!

    One way to enforce the latest copy is to delete the hidden $TF folder manually. To do that, go to command prompt and navigate to the root folder where you project was checked out and issue this command

    rd/s $tf                    // remove $TF folder and everything inside it
    

    If you want to just check the hidden folder, you can do it using

    dir /ah                    // display hidden files and folders
    

    Note: If you do it, the tf will think you do not have any local copy even though you have it in files and it will sync up everything again.

    Caution: Use this method at your own risk. Please do not use it on critical work.

提交回复
热议问题