我遇到了一个常见的困境。
很多时候,我们公司依赖使用开源库来完成工作,但有时我们必须修改它们以使其在不同平台上运行、修复错误等。
我们使用 subversion 的组合:TortoiseSVN 和 AnkhSVN。
有没有办法让以下场景使用 SVN:
- 开发人员将开源项目的源代码添加到我们的 subversion(通常通过导出,具体取决于他们使用的源代码控制)
- 开发人员对开源代码进行了一些更改
- 开源项目创建者自己进行了一些改进和错误修复
- 我们如何将开源项目的更改合并到我们的颠覆中?
如果 SVN 不能做到这一点,我们是否有更好的源代码控制选项?如果可能的话,我们更喜欢与 Visual Studio 集成的产品。
I have run into a common dilemma.
Many times, our company relies on using open source libraries to get things done, but occasionally we have to modify them to get it to run on different platforms, fix bugs, etc.
We use a combination of subversion: TortoiseSVN, and AnkhSVN.
Is there a way for the following scenario to work with SVN:
- Devs adds the source code from an open source project to our subversion (usually via export, depending on what source control they use)
- Devs make several changes to the open source code
- Open source project creator makes several improvements and bug fixes of their own
- How do we merge the changes from the open source project to our subversion?
If SVN can't do this, is there a better source control option for us? We would prefer one with Visual Studio integration if possible.
发布评论
评论(2)
Subversion 当然可以做到这一点。这种事情在分布式 VCS 出现之前就已经发生了。请参阅 供应商分支 部分://svnbook.red-bean.com/en/1.8/svn.branchmerge.html" rel="nofollow">Subversion 书中的第 4 章分支和合并。
引用:
Subversion can do this of course. This kind of stuff was happening before distributed VCSs existed. See Vendor Branches section from Chapter 4. Branching and Merging in Subversion book.
Quote:
Subversion 在这里不是合适的工具。您正在寻找的内容需要一个分布式版本控制系统,这基本上意味着您可以跨存储库拉动和推送,并且没有中央存储库。
查看 Git 和 Mercurial 了解更多信息。如果上游项目使用 Subversion,您可以使用 git-svn 作为桥梁 - 您创建自己的存储库,更改内容,并且您仍然可以将 svn 合并到其中以及推送到您自己的“上游/中央”git 存储库。
另请注意:您是否有理由不直接将更改贡献给项目? (特别是如果该项目获得了 GPL 或 LPGL 等许可,这迫使您在适当的许可下向公众发布修改后的源代码,许多项目都是如此)。这似乎是回馈那些免费为您提供代码的人的好方法...
以下问题针对 Git + Visual Studio:将 Git 与 Visual Studio 结合使用
Subversion is not the right tool here. What you are looking for requires a Distributed Version Control System, which basically means you can pull and push across repositories, and there's no central repository.
Check out Git and Mercurial for more information. If the upstream project uses Subversion, you can use git-svn as a bridge - you create your own repository, change stuff, and you can still merge the svn into it as well as push to your own "upstream/central" git repository.
Also note: Is there a reason you don't contribute your changes directly to the project? (Especially if the project is licensed under something like GPL or LPGL that forces you to release your modified source to the public under a suitable license, which many projects are). It seems that would be a great way to give back to the people that are giving you code for free...
The following question addresses Git + Visual Studio: Using Git with Visual Studio