TFS / 合并错过的签到

发布于 2024-12-09 23:06:00 字数 304 浏览 0 评论 0原文

是的,这是 Doh 之一!该死!我搬起石头砸自己的脚。我在大型团队中没有太多使用 TFS 的经验,但我面临着这个问题。

在过渡到新设备的过程中,开发人员忘记签入一些代码。新笔记本电脑上的工作进行了几周,然后才发现之前的工作没有签入。发生了多次签入。

我已经从旧笔记本电脑中恢复了文件,并将它们放在我当前的笔记本电脑上。合并这些变化的最佳方式是什么?我是否要创建一个分支,合并这些更改,然后重新加入该分支?

是否有一本“食谱”详细说明了面对各种情况时应该采取的措施?

我们正在使用 TFS 2010。

提前致谢...

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 occured.

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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我一向站在原地 2024-12-16 23:06:00

在这里创建一个分支可能比这种一次性情况所需的重量要重一些。如果是我,我会这样做:

  1. 在计算机上使用适当的映射设置一个工作区。
  2. 对另一台计算机所在的版本执行“获取特定版本”。最好的情况是用户从未删除服务器上的工作区。然后,您可以简单地将其工作区指定为版本,然后您将获得笔记本电脑上存在的文件。 (您可以将其指定为 Wworkspacename;所有者名称。)如果用户删除了他们的工作区,您可以根据他们所在的变更集编号或他们工作的日期来获取。
  3. 将恢复的文件复制到新的 TFS 工作区顶部。
  4. Team Foundation Server Power Tools 运行 tfpt online 。这将根据服务器检查本地文件系统并确定进行了哪些更改。您可能希望检查这些选项,特别是 /diff 标志(对文件执行 MD5,而不是简单地检查只读位)、/deletes>/adds 标志,分别检测已删除和添加文件。
  5. 对您的工作区进行“获取最新信息”,解决所有冲突,然后签入。

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.
丿*梦醉红颜 2024-12-16 23:06:00

您可以按照以下顺序进行尝试:

  1. 根据恢复的笔记本电脑代码离开版本控制系统的时间戳,对代码版本进行合并分支。
  2. 将分支代码放到磁盘上的某个位置。
  3. 对整个工作区的编辑执行签出。
  4. 将旧的恢复代码复制到此工作区中的文件上。
  5. 将本地代码签入分支。
  6. 将您最新的代码(主干)合并到分支中,合并更改,解决冲突。
  7. 如果合并分支上的所有构建和测试均正确,则将该分支合并回主分支。

那应该可以完成工作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文