为什么在 Visual Studio 2012 中默认启用自动解决冲突? [英] Why is Auto Resolve conflicts on by default in Visual Studio 2012?

查看:33
本文介绍了为什么在 Visual Studio 2012 中默认启用自动解决冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近安装了 Visual Studio 2012,我正在与我们团队的另一名成员一起开发一个全新的项目,使用 Team Foundation Server 2010 进行源代码控制.我最近注意到我的一些文件在我签入时被随机损坏.然后在输出窗口中注意到有关冲突的通知,这些通知已自动解决!?

We've recently installed Visual Studio 2012, and I'm working on a brand new project in there with one other member of our team, using Team Foundation Server 2010 for source control. I recently noticed some of my files getting randomly mangled when I check in. Then noticed in the output window notifications about conflicts, which were automatically resolved!?

事实证明这是 Visual Studio 2012 中的默认设置!

It turns out this is the default setting in Visual Studio 2012!

我在 MSDN 上找到了一篇详细介绍如何关闭此设置的文章 (http://msdn.microsoft.com/en-gb/library/vstudio/ms181432.aspx#automatic_options),但我很好奇是否有人知道为什么默认情况下会启用这种具有潜在破坏性的设置?

I found an article on MSDN detailing how to turn this setting off (http://msdn.microsoft.com/en-gb/library/vstudio/ms181432.aspx#automatic_options), but I'm curious if anyone knows why this potentially devastating setting would be on by default?

推荐答案

因为它是大多数其他工具的默认设置,而使用 Team Foundation Server 的人们发现他们必须明确告诉工具自动合并令人沮丧.更重要的是,人们甚至没有发现很明显他们必须明确告诉工具自动合并,并抱怨合并分支产生的大量冲突,因为在许多工具中,用户甚至不会被告知合并冲突",直到它不能被自动合并.因此,Team Foundation Server 似乎未能正确执行三向合并.

Because it's the default in most other tools, and people coming to Team Foundation Server found it frustrating that they would have to explicitly tell the tool to automerge. More to the point, people didn't even find it obvious that they would have to explicitly tell the tool to automerge and complained about the sheer number of conflicts produced by merging branches, because in many tools, users aren't even told about a "merge conflict" until it can't be automerged. Thus it appears that Team Foundation Server failed to do a three-way merge properly.

显然,这里正确的默认是判断调用.我没有成功,但我支持它.

Obviously, the correct default here is a judgement call. I didn't make it, but I support it.

不过,我担心这种默认更改会暴露您的合并工作流程中的一些问题.Automerge 可以绝对产生人类不会的结果'不生产,这是毫无疑问的.但它是一个完善的标准,通常被认为是安全、有用和总体正确的.

I worry, though, that this change in defaults is exposing some issues in your merge workflow. Automerge can absolutely produce results that a human wouldn't produce, there's no question about that. But it's a well-established standard and generally considered safe, useful and generally correct.

如果这在某种程度上是危险的",那么您的过程应该在您签入之前很久就被捕获.希望您在签入之前很久就在本地构建并运行完整的测试通过,并且您的持续集成构建 如果您没有这样做,请捕获这些错误.

If this is somehow "dangerous" then your process should catch that long before you check in. Hopefully you would have built locally and run a full test pass long before you check in and your continuous integration build would also catch these errors if you failed to do so.

如果自动合并产生错误的输出,您可以随时手动合并文件.当然,您也可以将自动合并选项设置为关闭".

If automerge produces incorrect output, you can always merge the file by hand. And, of course, you can also just turn the automerge option to "off".

这篇关于为什么在 Visual Studio 2012 中默认启用自动解决冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆