linux - Mercurial 中的两个关闭 repo

标签 linux mercurial repository shared

我目前正在进行一个项目,我正在考虑将其开源,但我绝对希望暂时将其封闭源代码。在这个项目中,我有一个我想公开的子项目,这样任何人都可以访问/ fork 它。

这就是我想要的:

Mercurial SCC 具有:

  • Repo 1:来自 /dir/project/ 的所有文件 - 私有(private) repo,需要用户名/密码才能拉取/推送/fork/浏览等。
  • Repo 2:来自 /dir/project/stuff 的一些文件 - 公共(public) repo,但需要用户名/密码才能修改。

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

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

最佳答案

您应该使用“ subrepository ”来定义项目的两个部分:

  • 您的父存储库将是私有(private)存储库,并引用(在 .hgsub 文件中)您的公共(public)存储库 ()
  • 您的公共(public) repo 将存储在公共(public)引用中,而不知道私有(private)部分。

(这里不需要符号链接(symbolic link))
另请参见同类问题中的 SO 问题“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.

关于linux - Mercurial 中的两个关闭 repo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4524771/

相关文章:

c - C中通过消息队列发送文件出错?

c++ - 应用程序库之间循环依赖的影响

Mercurial 在每次提交时自动推送

java - DDD : Maintaining Constraints Across Aggregates

repository - TYPO3/如何从现有表 fe_users 创建存储库?

linux - 在linux命令行上按时间戳对日志文件进行排序

php - 使用 PHP 获取 PID 的程序名称

c# - 如何在 Visual Studio 中生成项目的设置设计器文件

version-control - 在 Mercurial 中使用多个远程位置进行推拉

oracle - 尝试访问 Oracle 的 Maven 存储库