.net TFS 与 SVN

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/661389/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 12:22:14  来源:igfitidea点击:

TFS vs SVN

.netsvnversion-controltfsconfiguration-management

提问by Binoj Antony

I am about to start a project (.NET) and need to decide between TFS and SVN.

我即将开始一个项目 (.NET),需要在 TFS 和 SVN 之间做出决定。

I am more used to SVN(with tortoise client), CVS and VSS. Does TFS have all features available in SVN

我更习惯于 SVN(带乌龟客户端)、CVS 和 VSS。TFS 是否具有 SVN 中可用的所有功能

Have any of you switched from SVN to TFS and found it worthwhile?
Also it looks like we may need Visual Studio if we need to work with TFS.

你们有没有人从 SVN 切换到 TFS 并发现它值得?
如果我们需要使用 TFS,看起来我们可能需要 Visual Studio。

[Edit]
Money is not a consideration since we already have the licenses for TFS in place. And I am more interested in the Source Control features of TFS vs SVN, of course other features list is also welcome.

[编辑]
金钱不是考虑因素,因为我们已经拥有 TFS 的许可证。而且我对 TFS vs SVN 的 Source Control 功能更感兴趣,当然其他功能列表也欢迎。

采纳答案by Brann

Well, to me, the choice is obviously TFS :

好吧,对我来说,选择显然是 TFS :

  • SVN integration into Visual Studio is incomplete to say the least (a lot of features aren't available from the IDE), and a bit buggy (AnkhSVN certainly is), while TFS one is perfect (which makes sense...). I've had my whole workspace corrupted several times using SVN (during one month), never using TFS (aprox 2 years)

  • While Source-Control related features of both systems are probably quite equivalent, they are accessible directly from the IDE with TFS, while you have to rely on TortoiseSVNor other external tools if you use SVN. Almost all TFS tasks are accessible in a few clicks on the solution explorer tab.

  • Merging is a lot easier with TFS, even for complex merges (for example, SVN will add <<<<<<'s and >>>>>>>>>'s to your .csproj files, so you'll need to manually edit them to open them again from VS.)

  • SVN 集成到 Visual Studio 中至少可以说是不完整的(IDE 中没有很多功能),并且有点错误(AnkhSVN 肯定是),而 TFS 是完美的(这是有道理的......)。我的整个工作区使用 SVN(一个月内)多次损坏,从未使用 TFS(大约 2 年)

  • 虽然两个系统的 Source-Control 相关功能可能相当等效,但它们可以通过 TFS 直接从 IDE 访问,而如果您使用 SVN ,则必须依赖TortoiseSVN或其他外部工具。在解决方案资源管理器选项卡上单击几下即可访问几乎所有 TFS 任务。

  • 使用 TFS 合并要容易得多,即使对于复杂的合并(例如,SVN 会将 <<<<<< 和 >>>>>>>>> 添加到您的 .csproj 文件中,因此您需要手动编辑它们以从 VS 再次打开它们。)

While I think those reasons are more than enough to prefer TFS over SVN, I mus add that :

虽然我认为这些原因足以让 TFS 比 SVN 更受欢迎,但我必须补充一点:

  • TFS is more than just a source-control tool (think work items, project portal, etc.)

    I've used it on a medium-sized project (12 coders, 3 testers, 3 business analysts) in the past, and we've been able to successfully centralize all the tasks in TFS (bug reports, project documentation, build process, etc.)

    I'm not saying it's not possible to do the same using SVN and other third-party tools, but it's definitely nice to have all things nicely integrated in one product.

  • TFS 不仅仅是一个源代码控制工具(想想工作项、项目门户等)

    过去我曾在一个中型项目(12 名编码员、3 名测试员、3 名业务分析师)中使用过它,我们已经能够成功地将 TFS 中的所有任务(错误报告、项目文档、构建过程、等等。)

    我并不是说使用 SVN 和其他第三方工具做同样的事情是不可能的,但是将所有东西很好地集成到一个产品中绝对是件好事。



To stay fair, here are the two obvious drawbacks of TFS :

为了公平起见,以下是 TFS 的两个明显缺点:

  • Its price

  • Installing TFS is quite a pain, while SVN installation is a matter of minutes.

    Installing TFS 2008 over SqlServer 2008 is quite complicated, you cannot install TFS on a PDC, etc. To me, it's definetely the worst installation experience I've ever had with a Microsoft product.

    That being said, once installed, TFS is very easy to use (especially for coders not familiar with source control systems)

  • 它的价格

  • 安装TFS相当痛苦,而安装SVN则是几分钟的事情。

    在 SqlServer 2008 上安装 TFS 2008 非常复杂,你不能在 PDC 上安装 TFS,等等。对我来说,这绝对是我使用 Microsoft 产品时遇到的最糟糕的安装体验。

    话虽如此,一旦安装,TFS 非常易于使用(特别是对于不熟悉源代码控制系统的编码人员)



In my current project, I started with SVN, and quickly switched to TFS. I'm happy I did.

在我目前的项目中,我是从 SVN 开始的,然后很快就切换到了 TFS。我很高兴我做到了。

The main reason why I've decided to switch is clearly the overall buggy behaviour of SVN (I was using VisualSVNas a server and AnkhSVNas a client). At least once a week, I found myself spending hours on cryptical AnkhSVN error messages.

我决定切换的主要原因显然是 SVN 的整体错误行为(我使用VisualSVN作为服务器,使用AnkhSVN作为客户端)。至少每周一次,我发现自己在神秘的 AnkhSVN 错误消息上花费数小时。

To date, I haven't found a single reason to regret the switch to TFS.

迄今为止,我还没有找到任何理由让我后悔改用 TFS。

回答by NileshChauhan

"One can not compare between TFS and SVN"

TFS 和 SVN 无法比拟

SVN: is Source Code Versioning System
TFS: is full fledged Software Development Management system which contains, Version control, Release management, Requirements tracking, Document publishing and other things.

SVN:是源代码版本控制系统
TFS:是成熟的软件开发管理系统,其中包含版本控制、发布管理、需求跟踪、文档发布和其他内容。

Both have nice to use IDE integration add-ins(e.g. AnkhSVN, Collabnet's add-in) available for VS2005, so that is not the point to consider.

两者都可以很好地使用可用于 VS2005 的 IDE 集成插件(例如 AnkhSVN,Collabnet 的插件),所以这不是要考虑的重点。

Criteria to consider for choice:
- If you have a no or small budget project choose SVN
- If you are only looking for version control system choose SVN, if you are looking for complete development management choose TFS
- If you have patience to juggle with different integration tools (CruiseControl.Net, NUnit, NCover, FIT) to achieve proper development environment choose SVN, or if you are looking for out of the box implementation of all these for you then choose TFS

考虑选择的标准
- 如果您没有预算或预算很小的项目,请选择SVN
- 如果您只是在寻找版本控制系统,请选择SVN,如果您正在寻找完整的开发管理,请选择TFS
- 如果您有耐心处理不同的问题集成工具(CruiseControl.Net、NUnit、NCover、FIT)以实现适当的开发环境选择SVN,或者如果您正在寻找所有这些的开箱即用的实现,则选择TFS

回答by MrTelly

Having used TFS 18 months back I found it buggy, slow, annoying, very limited search criteria and it had the feel of a product rushed out by a team of un-interested, under paid, over worked techs being forced to use Sharepoint and other MS technologies because that's what marketing wanted. Seriously it was a dog, I would have rather used SourceSafe!

18 个月前使用过 TFS 后,我发现它有缺陷、缓慢、烦人、搜索条件非常有限,并且有一种产品被一群不感兴趣、报酬不足、工作过度的技术人员赶出的感觉,他们被迫使用 Sharepoint 和其他MS 技术,因为这就是营销想要的。说真的,这是一只狗,我宁愿使用 SourceSafe!

SVN on the other hand is bit techie, IDE integration is a pain, and it can occasionally get confused, but the user base is massive and most issue can get resolved with a quick SO quesition.

另一方面,SVN 是位技术人员,IDE 集成很痛苦,有时会让人感到困惑,但用户群庞大,大多数问题都可以通过快速的 SO 问题解决。

Have you considered Vault? Works well, and isn't too pricey.

你考虑过Vault吗?效果很好,价格也不贵。

回答by Chris Walter

I would only recommend TFS if you were using the 2013 version and using the Git based repository. I've encountered too many issues with the previous versions to consider them stable.

如果您使用 2013 版本并使用基于 Git 的存储库,我只会推荐 TFS。我在以前的版本中遇到了太多问题,无法认为它们是稳定的。

  • It's impossible to send multiple files to your diff tool at once. This is ridiculously useful when you want to review your changes before a merge and isn't available.
  • Inconsistent availability of functionality. Some functionality is available from only within the IDE while other pieces are only available from Windows Explorer, while still others are only available from the command line.
  • Adding files to version control is not available from the IDE and only available from Windows Explorer integration.
  • Accessing shelf sets is only available from within the IDE and not available through Windows Explorer integration.
  • Lack of a single unified installer. It's not enough just to install TFS, you also have to install team tools and power tools to get basic functionality.
  • Shelf set functionality does not merge. What could have been a cool way of doing private branches, essentially guarantees your code will go out of date and stop working.
  • You have to manually unlock text files before you edit them if you need to use an editor other than Visual Studio.
  • Sometimes Visual Studio forgets to unlock files that it itself is managing and throws an error.
  • The check in and shelving UIs base available files for commit on what has already been added to TFS and not what is actually present within the file system. This makes it extremely easy to miss files. (This is actually a problem with the way Visual Studio handles project files, but that in itself is another rant).
  • It is unnecessarily difficult to use non Microsoft tools for editing your source due to the previously mentioned issues.
  • TFS configuration is committed with your source. This means that if you change your TFS server the configuration for all your history is now incorrect. There is a default configuration you can use which overrides this behavior but it is not obvious.
  • No support for ignore filters at anything but the base level.
  • Inability to handle paths of greater than 249 characters.
  • Files that have been unlocked, but not edited show show up as changed, even though they haven't been. Differentiating between changed and unlocked would make it a lot easier for diffs, or better yet doing away with the entire broken unlocking system entirely.
  • Windows Explorer icon overlays don't clearly show whether a file has been edited. All file in TFS have a green corner while modified files add a pencil to the bottom of the icon. Switching to red corner for modified would be a lot easier to see or using the tortoise system of icons.
  • Older versions of Visual Studio have problems integrating within newer versions of TFS. This means we now have an IDE version dependency in source control.
  • Includes the user solution files by default when they aren't needed. Of course I'll admit this one might be a matter of preference.
  • Bad caching makes it possible that differences between your local copy and the server aren't accurately reflected. It's extremely frustrating to Get Latest and find that you don't actually have latest.
  • 一次将多个文件发送到差异工具是不可能的。当您想在合并之前查看更改并且不可用时,这非常有用。
  • 功能可用性不一致。某些功能只能在 IDE 中使用,而其他部分只能从 Windows 资源管理器中使用,还有一些功能只能从命令行使用。
  • IDE 无法将文件添加到版本控制,只能从 Windows 资源管理器集成中使用。
  • 只能从 IDE 中访问货架集,不能通过 Windows 资源管理器集成访问。
  • 缺少一个统一的安装程序。仅仅安装 TFS 是不够的,您还必须安装团队工具和强大的工具才能获得基本功能。
  • 货架集功能不合并。做私有分支可能是一种很酷的方式,基本上可以保证您的代码会过时并停止工作。
  • 如果需要使用 Visual Studio 以外的编辑器,则必须在编辑文本文件之前手动解锁它们。
  • 有时 Visual Studio 会忘记解锁它自己管理的文件并引发错误。
  • 签入和搁置 UI 基于已添加到 TFS 的内容而不是文件系统中实际存在的内容进行提交的可用文件。这使得丢失文件非常容易。(这实际上是 Visual Studio 处理项目文件方式的一个问题,但这本身就是另一个咆哮)。
  • 由于前面提到的问题,使用非 Microsoft 工具来编辑源代码是不必要的困难。
  • TFS 配置与您的源一起提交。这意味着如果您更改 TFS 服务器,则所有历史记录的配置现在都不正确。您可以使用一个默认配置来覆盖此行为,但这并不明显。
  • 除了基本级别之外,不支持忽略过滤器。
  • 无法处理超过 249 个字符的路径。
  • 已解锁但未编辑的文件显示为已更改,即使它们尚未更改。区分更改和解锁将使差异更容易,或者更好地完全消除整个损坏的解锁系统。
  • Windows 资源管理器图标覆盖不会清楚地显示文件是否已被编辑。TFS 中的所有文件都有一个绿色角落,而修改后的文件在图标底部添加了一支铅笔。切换到红色角落进行修改会更容易查看或使用图标的乌龟系统。
  • 较旧版本的 Visual Studio 在与较新版本的 TFS 集成时存在问题。这意味着我们现在在源代码管理中有一个 IDE 版本依赖项。
  • 默认情况下包含不需要的用户解​​决方案文件。当然,我承认这可能是一个偏好问题。
  • 糟糕的缓存可能会导致您的本地副本和服务器之间的差异无法准确反映。获取最新信息并发现您实际上没有最新信息是非常令人沮丧的。

回答by Saulius ?emaitaitis

It's been 1.5 years now that I'm using SVN for various projects. Setups I've used so far:

我在各种项目中使用 SVN 已经 1.5 年了。到目前为止我使用的设置:

  • AnkhSVNclient for Visual Studio. It integrates nicely as Source Control provider since version 2.
  • Servers either CollabNet Subversionon windows or Apache 2.2 with SSL + SVN through DAV on linux.
  • 用于 Visual Studio 的AnkhSVN客户端。自版本 2 以来,它作为源代码控制提供程序很好地集成在一起。
  • 服务器要么是Windows 上的CollabNet Subversion,要么是带有 SSL + SVN 的 Apache 2.2 通过 Linux 上的 DAV。

Haven't had any problems with any of these setups and I definetly recommend using SVN as it's free and easy to start using. Also many project management / bug tracking packages integrate with SVN (like tracfor instance).

这些设置中的任何一个都没有任何问题,我明确推荐使用 SVN,因为它免费且易于开始使用。还有许多项目管理/错误跟踪包与 SVN 集成(例如trac)。

回答by achinda99

I'd pick SVN. I've worked with SVN from a developer standpoint before and I currently work with TFS, and let me tell you that TFS is painful. While TFS is feature full and is more than just version control, its version control is sloppy at best. Merging is horrendous and many of us now turn to manual merging or merge tools because we can't rely on TFS. Files go missing, aren't downloaded to the local system sometimes, and there are just oddities in its behavior that make you want to bang your head against a desk.

我会选择SVN。我以前从开发人员的角度使用过 SVN,现在我使用 TFS,让我告诉你 TFS 是痛苦的。虽然 TFS 功能齐全并且不仅仅是版本控制,但它的版本控制充其量只是草率。合并是可怕的,我们中的许多人现在转向手动合并或合并工具,因为我们不能依赖 TFS。文件丢失,有时不会下载到本地系统,而且它的行为有些奇怪,让你想把头撞在桌子上。

That being said, if you want TFS in all its glory, are willing to work with its pain points, it is a great tool to setup automated builds, and releases.

话虽如此,如果您想要 TFS 的所有荣耀,并愿意解决它的痛点,那么它是设置自动构建和发布的绝佳工具。

回答by Sakkle

Check out this article before you decide: A Comparison of TFS vs Subversion for Open Source Projects

在你决定之前先看看这篇文章:开源项目的 TFS 与 Subversion 的比较

回答by Reed Copsey

I've used both - but actually, I've switched my main projects from TFS into SVN. I find the offline and anonymous access very valuable in my projects.

我两个都用过——但实际上,我已经将我的主要项目从 TFS 切换到 SVN。我发现离线和匿名访问在我的项目中非常有价值。

In general, I think they are comparable. I would just pick the one you know the best, and you are the happiest maintaining. I don't find the specific features in one dramatically outweight the features in the other system.

总的来说,我认为它们具有可比性。我会选择你最了解的一个,你是最快乐的维护者。我没有发现一个系统中的特定功能显着超过另一个系统中的功能。

回答by danswain

If you're familiar with svn I'd stick with it. Tfs isn't free and isn't simple. It does far more than just source control. If you're a .net shop like us and you're deciding what product to use for the whole dev cycle it's a contender, but for simple source control it's overkill.

如果您熟悉 svn,我会坚持下去。Tfs 不是免费的,也不简单。它不仅仅是源代码控制。如果您是像我们这样的 .net 商店,并且您正在决定在整个开发周期中使用哪种产品,那么它是一个竞争者,但对于简单的源代码控制来说,这有点过头了。

回答by craziac

I'd say TFS is more than just source control. If you can afford it, I would definitely advise to use it. When you start using Team Builds for example, or using stuff like Work Items, then you'll see that TFS can really manage your whole development life cycle, providing a rich environment in which reporting, ease of use, slick VS integration and solid source control are all rolled in to one.

我想说 TFS 不仅仅是源代码控制。如果您负担得起,我绝对建议您使用它。例如,当您开始使用 Team Builds 或使用 Work Items 之类的东西时,您会发现 TFS 确实可以管理您的整个开发生命周期,提供一个丰富的环境,其中报告、易用性、巧妙的 VS 集成和可靠的源代码控制都合而为一。

It does require some iron on the server side. I do not find it to be slow however, it works nicely over VPN and supports offline work.

它确实需要在服务器端使用一些熨斗。但是,我不觉得它很慢,它通过 VPN 运行良好,并支持离线工作。

A major con is the install process (on the server side) which is tedious, non-flexible and in my mind (I come from a field in which packaging up apps and deployment are very important) a bad example of how SQL Server, Reporting Services, Sharepoint and webservices could be installed.

一个主要的缺点是安装过程(在服务器端)是乏味的、不灵活的,在我看来(我来自一个打包应用程序和部署非常重要的领域)是 SQL Server、Reporting可以安装服务、Sharepoint 和网络服务。