如何使用 Mercurial 同步同一工具的封闭版本和开源版本?

发布于 2024-10-06 08:31:25 字数 202 浏览 0 评论 0原文

我有一个工具,我想发布其源代码。但是,由于许可限制,某些功能无法作为开源部分发布。我通常希望使用代码的开源版本来开发工具本身,但在每个版本中,我需要将封闭版本中的一些功能移植回特定客户端的构建中。

我不能只使用普通分支来实现此目的,因为这会将闭源位放入与我想要共享开放代码的同一存储库中(在本例中为 Bitbucket)。

我能做些什么还是我只能手动移动源?

I have a tool I would like to release the source to. However, a few features cannot be released as open source parts because of licensing restrictions. I'd like to generally develop the tool itself using the open source version of the code, but at each release I need to port the few features in the closed version back into the build for a particular client.

I can't just use a normal branch for this, because that would put the closed source bits into the same repository as where I'd like to share the open code (in this case, Bitbucket).

Is there anything I can do or am I stuck with manually moving source around?

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

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

发布评论

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

评论(2

我们只是彼此的过ke 2024-10-13 08:31:25

您能否将秘密位分成插件/附加组件(可以通过构建或运行时配置启用的东西)并将代码库分成两个存储库,一个用于开源版本(也是闭源版本的基础),以及一个用于闭源添加?

这样,闭源构建仍将使用相同的存储库,但从秘密的第二个代码库中添加一些额外的内容。构建过程与外部上游库的构建过程类似。

Can you segregate the secret bits into plugins/addons (something that can be enabled by build or runtime configuration) and split the codebase into two repositories, one for the open source edition (and also the base for the closed-source edition), and one for the closed-source additions?

This way, the closed-source build would still use the same repository, but add some extra stuff from the secret second code base. The build process would be similar to the one for an external upstream library.

初雪 2024-10-13 08:31:25

您将有 2 个存储库,一个包含所有封闭源代码,另一个包含所有开放源代码。

在闭源存储库中,您将从开源存储库中提取所有更改,并与闭源存储库合并。

这应该可以正常工作,除非您必须实现两者中不同的某些部分,然后当您合并更改时,这些区域中将会出现合并冲突。

You would have 2 repositories, one containing all the closed source, and one containing all the open.

In your closed source repository, you would pull in all the changes from the open source repository, and merge with the closed source.

This should work without problems unless you have to implement some parts different in the two, then you will have merge conflicts in those areas when you merge in your changes.

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