TFS:在不获取最新版本的情况下签出项目,或使用本地文件解决冲突
使用 VS 2010 & TFS 2010:
我有一个从 Visual SourceSafe 迁移的 TFS 团队项目。
在服务器上进行迁移时,我对文件的本地工作副本进行了更改。现在我想签入这些更改。
我已将团队项目映射到 本地文件夹。当我执行 Get 操作时 最新的,所有不是的文件 可写在磁盘上被添加到 工作区。
对于已更改的文件 可写,我遇到冲突。在 “待定更改 - 冲突”窗格, 每次冲突的唯一选择 是 1)“覆盖本地文件或 文件夹”,或 2) 自动解析 使用 AutoMerge 合并冲突 “与任何内容更改发生冲突”。
选项 1 与我的相反 想。我想查看文件 并使用我的本地副本,而不是服务器 复制,在工作区中。
当我 尝试一下。
如果我尝试查看其中一个 更改文件后,我收到错误:“ 找不到项目[项目] 您的工作空间,或者您没有 访问它的权限”。
如何在不先从服务器获取每个文件的副本的情况下签出然后签入本地更改?
Using VS 2010 & TFS 2010:
I have a TFS team project that was migrated from Visual SourceSafe.
While the migration was carried out on the server, I made changes to my local working copies of the files. Now I want to check in those changes.
I have mapped the team project to a
local folder. When I did a Get
Latest, all files that weren't
writable on disk were added to the
workspace.For the files that changed, and were
writable, I get conflicts. In the
"Pending Changes - Conflicts" pane,
the only options for each conflict
are to 1) "Overwrite Local File or
Folder", or 2) AutoResolve the
conflict using AutoMerge to merge
"Conflicts with any content changes".Option 1 is the opposite of what I
want. I want to check out the file
and use my local copy, not the server
copy, in the workspace.Option 2 doesn't do anything when I
try it.
If I try to check out one of the
changed files, I get the error: "The
item [item] could not be found in
your workspace, or you do not have
permission to access it".
How do I check out, then check in, local changes without first getting a copy of each file from the server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通常您会有第三个选项“保留本地版本”。我猜你没有它,因为本地文件只是服务器文件的精确本地副本。它们不是工作区的一部分,这就是您在尝试检查它们时收到错误的原因。
一种快速解决方案是将本地副本移出工作区,执行获取最新操作,以便将其服务器副本下载到您的工作区,然后检查这些下载的文件并将其替换为正确的本地副本。
或者,您可以尝试在本地副本上执行“添加”(tf add - 如果您使用命令行工具)而不是“编辑”,然后再次执行“获取最新”。将文件添加到 TFS 服务器后,您可能会看到第三个选项“保留本地版本”。
希望这有帮助。
Normally you would have a third option to "Keep the local version". I guess you don't have it because the local files are just exact local copies of the server files. They are not part of the workspace, and that's why ou get the error when trying to check them out.
One quick solution is to move the local copies out of the workspace, do a get latest so their server copies get downloaded to your workspace, then check these downloaded files out and replace them with your correct local copies.
Alternatively, you can try do an Add (tf add - if you use the command-line tool) instead of an Edit on the local copies, then do a Get Latest again. With the files being added to your TFS server, you'll probably get the third option to "Keep the local version".
Hope this helps.
我在使用 Visual Studio 2010 时遇到了同样的问题,但我可以使用 Visual Studio 2012 RC 选择另一个选项“保留本地版本”。
我的机器上同时安装了 Visual Studio 2010 和 Visual Studio 2012 RC,Visual Studio 2010 只有一个选项“覆盖本地文件或文件夹”,而 Visual Studio 2012 RC 有两个选项“覆盖本地文件或文件夹”和“保留本地版本” ”
I had the same problem using Visual Studio 2010 but I was able to choose another option "Keep Local Version" using Visual Studio 2012 RC.
I have both Visual Studio 2010 and Visual Studio 2012 RC installed on my machine, Visual Studio 2010 only have one option "Overwrite Local File or Folder" but Visual Studio 2012 RC has two options "Overwrite Local File or Folder" and "Keep Local Version"
首先检查一下,让 VS-TFS 为您获取最新版本,然后获取特定版本。它应该可以工作
First check out, let VS-TFS get you latest version and then, do get specific version. It should work