管理私有 Subversion 分支的正确工作流程:

发布于 2024-11-05 11:42:54 字数 387 浏览 6 评论 0原文

我想分叉一个开源项目。它有一个公共 SVN 存储库,我想从中查看源代码,将其克隆到我的私有存储库中,然后开始进行更改。如果可能的话,我希望将来能够合并来自上游存储库的更改。到目前为止,我已经能够这样做:

  1. 在我自己的存储库中为此项目创建一个文件夹。
  2. 查看这个空文件夹。
  3. 将原始项目检出到另一个位置。
  4. 删除此新位置中的所有 .svn 子目录。
  5. 将文件复制到我的私有存储库的工作副本中,提交一次,然后开始进行更改。

这可行,但看起来很难看,而且我根本不相信合并会正常工作。有更好的办法吗?

编辑:为了排除“只需提交补丁”的回复,只需说这是我的应用程序中需要的功能,但由于它故意破坏与现有功能的兼容性,因此上游不会接受它。

There is an open source project I would like to fork. It has a public SVN repository from which I would like to check out the source, clone it into my private repository, and begin making changes. If possible I would like to be able to merge changes from the upstream repository in the future. So far I've been able to do it like so:

  1. Create a folder for this project in my own repository.
  2. Check out this empty folder.
  3. Check out the original project into another location.
  4. Delete all .svn subdirectories in this new location.
  5. Copy the files into the working copy of my private repository, commit once, then begin making changes.

This works but it seems ugly and I'm not at all convinced that merge will work correctly. Is there a better way?

EDIT: To preclude replies of "just submit a patch", suffice it to say this is for a feature I need in my application but because it deliberately breaks compatibility with the existing functionality, it will not be accepted upstream.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

路弥 2024-11-12 11:42:54

我建议你看看 Git。

是的,该项目正在使用 Subversion,但 Git 有一个方便的小技巧,可以从 Subversion 中提取修订版本,允许您使用 Git 进行自己的个人版本控制,然后将更改提交回 Subversion。

这将使您能够与 Subversion 保持同步,并且仍然充分利用版本控制系统。

查看 git svn

如果你不想学习 Git(你也可以,因为大多数开源项目都在转向它),你可以看看 svk

I'm going to recommend that you look at Git.

Yes, the project is using Subversion, but Git has a handy little trick of pulling a revision out of Subversion, allowing you to use Git for your own personal versioning, and then committing your changes back into Subversion.

That would allow you to remain in sync with Subversion, and still take full advantage of a revision control system.

Take a look at git svn.

If you don't want to learn Git (you might as well since most open source projects are moving to it), you can take a look at svk.

小糖芽 2024-11-12 11:42:54

您需要的是“供应商分支”,其众所周知的工作流程。

What you need is called 'Vendor Branches', its well-known workflow.

韵柒 2024-11-12 11:42:54

svn export 将为您完成大部分工作。

svn export will do most of this for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文