Files modified while offline appears checked-in af

2019-09-17 06:16发布

Our TFS server went down yesterday so I was forced to work in offline mode. After modifying quite a number of files, the admin people found out there was a problem with the DNS and the alias that we used for the TFS no longer worked, so we had to change to the TFS server's IP address.

With this change, my solution could not bind itself to the "new" TFS server. So what I did was to removed the binding of my solution from the no-longer-working alias TFS server and bound it to the "new" server.

It looked like it was working. I was actually dreading the amount of manual merges that I had to do after doing a get latest, but to my surprise, there weren't any.

I noticed the start of the weirdness when I continued to work on some of the modified files. Although the files appeared checked-out, there actually was a few seconds of lag before I was able to do my first modification which signified that the file was re-checked-out then. Didn't take notice of it much, so I shelved my changes for the next day.

The following day, got the latest versions, and found that some of the files that I modified from the day before are checked-in. However, viewing the history and doing a compare confirmed that I have not checked my new changes in yet, and that my local version is different from the latest TFS version.

Now I'm having a bit of a trouble remembering what my changed files are, but I could probably take a look at the last shelving that I did and work with the list there. It is just extremely annoying that I would have to do a check-out for each of those files before I can finally check them in again.

Is there an easier way for TFS to recognize the modified files? Also, the rebinding was probably the culprit for why this happened, should I have done it some other way?

Edit: I just checked the details of my latest shelveset and my modified files were not included. So much for that.

Edit 2: I accidentally opened my solution offline, and when I went online, it was able to detect the files that were changed, thankfully. But the question still remains, what should I have done differently for this not to happen again?

1条回答
倾城 Initia
2楼-- · 2019-09-17 06:30

As Edward wrote "tfpt online" is one way to go. Actually it will show you identical ui to what Visual Studio shows you when going online. Another way, which gives you ui preview is "tf folderdiff" or Compare in Source Control Explorer. You can use "Reconcile" there, or apply changes manually. I'm pretty sure that changing server name affected visual studio integration in the way that "going online" from visual studio was impossible. You could modify bindings yourself, but usually it's not worth the risk.

查看更多
登录 后发表回答