开发者

TFS / Merging a missed check in

Yes this is one of the Doh! Damn! I shot myself in the foot. I don't have a lot of experience with TFS in large teams, but I'm facing this issue.

During a transition to new equipment, a developer forgot to check-in some code. Work proceeded on the new laptop for several weeks before noticing that the previous work was not checked in. Mutliple check-in have oc开发者_如何学Pythoncured.

I have recovered the files from the old laptop, and have them on my current laptop. What is the best way to merge in these changes? Do I create a branch, merge in these changes, and then rejoin the branch?

Is there a "cookbook" out there that details what should happen when faced with various situations?

We are using TFS 2010.

Thanks in advance...


Creating a branch here is probably a little bit heavier-weight than what you need for this one-off situation. If it were me, I would do this:

  1. Set up a workspace on your computer with the appropriate mappings.
  2. Do a Get Specific Version to the version that the other computer was at. The best case scenario is if the user never deleted their workspace on the server. Then you can simply specify their workspace as the version and you'll get the files as they existed on the laptop. (You can specify this as Wworkspacename;owner name.) If the user deleted their workspace, you can get based on the changeset number they were at, or based on the date they were working at.
  3. Copy the recovered files on top of the new TFS workspace.
  4. Run tfpt online from the Team Foundation Server Power Tools. This will examine the local filesystem against the server and determine what changes were made. You may wish to examine the options, notably the /diff flags (which performs MD5s on the file instead of simply examining the readonly bit), and the /deletes and /adds flags, which detect deleted and add files, respectively.
  5. Do a Get Latest on your workspace, resolve any conflicts, and check in.


You can follow this sequence to try out:

  1. Make a merge-branch of your code version based on the time-stamp of where your restored laptop code has left the version control system.
  2. Get your branched code to a location on disk.
  3. Perform a check-out for edit of the entire workspace.
  4. Copy the old restored code over the files in this workspace.
  5. Perform a checkin of the local code into the branch.
  6. Merge your latest code (main trunk) into the branch, merging changes, solving conflicts.
  7. If all build and tests out correctly on the merge branch, merge that branch back into the main.

That should do the job.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜