开发者

TFS: Check out an item without getting latest version, or resolve conflict by using local file

开发者 https://www.devze.com 2023-03-08 08:03 出处:网络
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

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 t开发者_如何学Goo 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?


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.


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"


First check out, let VS-TFS get you latest version and then, do get specific version. It should work

0

精彩评论

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