简体   繁体   English

如何绕过有关已删除目录的字符路径限制的 TFS 错误? (Visual Studio 2013)

[英]How to bypass TFS error regarding character path limits for directories that have been removed? (Visual Studio 2013)

I am using TFS to source control my c# ASP.NET MVC projects.我正在使用 TFS 来控制我的 c# ASP.NET MVC 项目。 I have a project called ProjectA , It has two branches (ie ProjectA and ProjectA-Dev .) ProjectA is my production branch, and ProjectA-Dev is my development branch.我有一个名为ProjectA ,它有两个分支(即ProjectAProjectA-Dev 。) ProjectA是我的生产分支,而ProjectA-Dev是我的开发分支。 ProjectA-Dev contains lots of new code for my project's upcoming release. ProjectA-Dev包含许多用于我的项目即将发布的新代码。

I am at a stage that I need to merge any change from production into dev.我正处于需要将生产中的任何更改合并到开发中的阶段。 My production version received a few bug fixes while I was working on my next release in ProjectA-Dev .当我在ProjectA-Dev处理我的下一个版本时,我的生产版本收到了一些错误修复。 I want to merge the added bug fixes into my ProjectA-Dev branch.我想将添加的错误修复合并到我的ProjectA-Dev分支中。

To merge ProjectA into ProjectA-dev , I opened "Solution Control Explorer", right clicked on ProjectA then on "Branching and Merging" then on "Merge".要将ProjectA合并到ProjectA-dev ,我打开了“解决方案控制资源管理器”,右键单击ProjectA然后单击“分支和合并”,然后单击“合并”。

On the Source Control Merge Wizard I selected $/TFS/ProjectA in the source branch.在源代码管理合并向导中,我在源分支中选择了$/TFS/ProjectA I then selected $/TFS/ProjectA-Dev in the target branch.然后我在目标分支中选择了$/TFS/ProjectA-Dev Then I hit "Next", selected "Latest Version", and hit "Finish".然后我点击“下一步”,选择“最新版本”,然后点击“完成”。

The process runs for approximately 10 seconds and then it gives me this error该过程运行了大约 10 秒,然后它给了我这个错误TF400959: 目录的 388 个字符的限制...超出了...的路径

The error makes complete sense.该错误完全有道理。 However, what is puzzling me is that the node_modules directory does not exist on either branch.然而,令我困惑的是node_modules目录在任何一个分支上都不存在。 Also, I removed the folder node_modules from my local projects.此外,我从本地项目中删除了文件夹node_modules

I should also note that node_modules used to be in TFS, but then I removed it from TFS few weeks ago using changeset 20000. But, today, in the latest version, the folder node_modules does not exist on TFS.我还应该注意到node_modules曾经在 TFS 中,但几周前我使用变更集 20000 从 TFS 中删除了它。但是,今天,在最新版本中,文件夹node_modules在 TFS 上不存在。 I also validated the same thing via the web portal.我还通过门户网站验证了同样的事情。

I tried to remove the TFS cache locally by deleting the content of this folder %localappdata%\\Microsoft\\Team Foundation\\5.0\\Cache but the issue still exists.我尝试通过删除此文件夹%localappdata%\\Microsoft\\Team Foundation\\5.0\\Cache的内容来在本地删除 TFS 缓存,但问题仍然存在。

How can I bypass this error and correctly merge these changes?如何绕过此错误并正确合并这些更改?

运行tf destroy "$/MyPath/To/Project/node_module"后,我终于让它工作了

TFS might not know what you changed (deleted node_modules files) and if the change might be relevant to the branch during a long changesets in branch projectA. TFS 可能不知道您更改了什么(已删除的 node_modules 文件),以及在分支项目 A 中的长更改集期间更改是否可能与分支相关。

You could find the specific changeset which you deleted the node_modules files first.您可以找到首先删除 node_modules 文件的特定变更集。 Then just use tf merge command with /discard option.然后只需使用带有/discard选项的tf merge 命令

/discard Does not perform the merge operation, but updates the merge history to track that the merge occurred. /discard不执行合并操作,但更新合并历史记录以跟踪合并发生。 This discards a changeset from being used for a particular merge.这会丢弃用于特定合并的变更集。

Sample command:示例命令:

tf merge $/Project/SourceBranch $/Project/TargetBranch /discard /recursive /version:C56693~C56693

It discards changeset 56693. The version is a from ~ to, so you can discard multiple changesets at once.它丢弃变更集 56693。版本是从 ~ 到,因此您可以一次丢弃多个变更集。 In your case discard the changeset till the specific changeset node_modules files deleted.在您的情况下,丢弃变更集,直到删除特定的变更集 node_modules 文件。 When the command has finished, you still need to check in the merge .命令完成后,您仍然需要签入 merge

After this just perform the normal merge action again.在此之后只需再次执行正常的合并操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio是否保留已删除的引用? - Visual Studio holding onto references that have been removed? 如何在visual studio 2013解决方案资源管理器中获取文件路径? - How to get a file path in visual studio 2013 solution explorer? Visual Studio 2013构建错误 - Visual Studio 2013 error on build Visual Studio 2013中有关更新到MVC 5的各种错误 - Various errors in Visual Studio 2013 regarding updating to MVC 5 无法在Visual Studio 2013中将TFS项目映射到网络驱动器 - Unable to map TFS projects to network drive in Visual Studio 2013 Visual Studio 2013:使用RSA SecurID连接到TFS - 自定义实现还是配置? - Visual Studio 2013 : Connect to TFS with RSA SecurID - Custom Implementation or Configuration? 如何解决Visual Studio 2013中的allowDefinition ='MachineToApplication'错误 - How to resolve allowDefinition='MachineToApplication' Error in Visual Studio 2013 与visual studio 2012相比,visual studio 2013是否删除或丢失了任何功能 - Is there any features removed or missing from visual studio 2013 compared to visual studio 2012 Visual Studio 2012 Express在读取大文件方面有限制吗? - Does Visual Studio 2012 Express have limits on reading large files? Visual Studio 2013与数据库的连接错误 - Visual Studio 2013 Connection Error with Database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM