Mercurial 中的两个关闭存储库

发布于 2024-10-08 18:18:40 字数 440 浏览 0 评论 0原文

我目前正在开发一个项目,我正在考虑将其开源,但我绝对想暂时将其保持闭源。在这个项目中,我有一个想要公开的子项目,这样任何人都可以访问/分叉它。

所以这就是我想要的:

一个 Mercurial SCC,其中包含:

  • Repo 1:来自 /dir/project/ 的所有文件 - 私有存储库,需要用户名/密码才能拉/推/分叉/browse 等。
  • Repo 2:来自 /dir/project/stuff 的一些文件 - 公共存储库,但需要用户名/密码才能修改。

我该怎么做?我有更好的方法可以做到这一点吗?我正在使用共享托管 Linux 环境来执行此操作,那么符号链接是一个更好的主意吗?

我愿意接受所有建议,谢谢,我还是个 HG 新手。

I have a project I'm currently working on, which I am contemplating making open source, but I definitely want to keep it closed-source for the time being. Inside this project, I have a sort of subproject that I want to make public, so anyone can access/fork it.

So here's what I want:

A mercurial SCC with:

  • Repo 1: All files from /dir/project/ - Private repo, requires username/password to pull/push/fork/browse etc.
  • Repo 2: Some files from /dir/project/stuff - Public repo, but requires username/password to modify.

How can I do this? Is there a better way I can do this? I'm using my shared hosting Linux environment to do this, so is symbolic linking a better idea?

I'm open to all suggestions thanks, still a bit of a HG newbie.

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

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

发布评论

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

评论(1

凶凌 2024-10-15 18:18:40

您应该使用“子存储库 ” 定义项目的两个部分:

  • 您的父存储库将是私有的,并引用(在 .hgsub 文件中)您的公共存储库 ()
  • 您的公共存储库将存储在公共引用中,而无需了解私人部分。

(此处不需要符号链接)
另请参阅同类问题中的SO问题“Mercurial Subrepos - 如何创建它们以及它们如何工作?”。

子存储库是一项允许您将存储库集合视为一个组的功能。这将允许您作为一个组来克隆、提交、推送和拉取项目及其关联的库。

You should use "subrepository" to define the two parts of your project:

  • your parent repo would be the private one, with a reference (in a .hgsub file) to your public repo ()
  • your public repo woud be stored in a public referential, with no knowledge of the private part.

(No symlink necessary here)
See also in the same kind of problem the SO question "Mercurial Subrepos - How do you create them and how do they work?".

Subrepositories is a feature that allows you to treat a collection of repositories as a group. This will allow you to clone, commit to, push, and pull projects and their associated libraries as a group.

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